Author SHA1 Message Date
Brues 9f288553a8 bump CAPI min to 1.17.10 2026-10-26 23:39:22 -05:00
Brues 82febbe94a panel: show per-addon memory in FPS & Lag tooltip
Use UpdateAddOnMemoryUsage/GetAddOnMemoryUsage like Blizzard's MainMenuBar performance tooltip: total addon memory plus the top 3 consumers, formatted with the TOTAL_MEM/ADDON_MEM global strings. Guarded so the tooltip falls back gracefully on clients without these APIs.
2026-10-25 21:36:43 -05:00
Brues 5594fc8ef6 Bump ClassicAPI minimum 1.17.4 2026-10-25 21:36:43 -05:00
Brues fe376b8e51 Keep buff timer text above the cooldown sweep 2026-10-25 20:32:49 -05:00
Brues e326cea05e Add radial sweeps to buff/debuff icon display 2026-10-25 20:26:45 -05:00
Brues d9e74b3bc5 Add per-frame reverse toggle for cooldown sweeps 2026-10-25 20:24:12 -05:00
Brues 0e428de74c Fix inactive nameplate alpha capped at 99%
CacheConfig clamped notargalpha to 0.99, so a 100% setting never reached full opacity. Clamp to 1.0 instead and detect the target plate by GUID comparison only, removing the alpha-based fallback that required the headroom.
2026-10-25 20:00:50 -05:00
Brues df21f1f26c stable: capture per-iteration button in Enable/Disable closures
Lua 5.0 shares the generic-for loop variable across iterations, so the
closures all saw the final (nil) value.
2026-10-25 12:12:05 -05:00
Brues bd7bf3f39f Size aura cooldown text to its laid-out icon
Unit frame aura icons only get their size from the layout pass, but
RefreshUnit started their timers before it ran. A cooldown text created
on a never-laid-out icon saw a height of 0 and fell back to a 16pt font,
so some buff and debuff timers overflowed their icons. (Closes #64)

- RefreshUnit stores each aura's timer and starts them after
  LayoutAuras, once every icon has its final size.
- With dynamic size on, the cooldown text re-sizes its font whenever
  its frame's height changed since the last SetTimer, so icons that
  switch between the normal and own aura size keep a matching font.
2026-10-25 11:48:24 -05:00
Brues 987c337709 Revert "Remove CLINK parsing"
This reverts commit c03b74c3d1.
2026-10-25 11:39:39 -05:00
Brues cdaf9336a3 nameplates: skip destroyed plates on PLAYER_LOGOUT
Leaving the world destroys the units before PLAYER_LOGOUT fires, so some
plates in the registry are already dead: their overlay buttons dropped
their events and lost their methods, and UnregisterAllEvents errored as a
nil method. Only silence the plates that are still alive.
2026-10-25 11:33:51 -05:00
Brues e4f0849816 Pass the draw layer as CreateTexture's second argument
CreateTexture("OVERLAY") names the texture "OVERLAY" and leaves it on
the default ARTWORK layer. Pass nil for the name so the layer applies.
2026-10-25 11:21:01 -05:00
Brues c03b74c3d1 Remove CLINK parsing 2026-10-24 23:23:16 -05:00
Brues e583ac1e83 Drive mapreveal from MAP_EXPLORATION_UPDATED and C_MapExplorationInfo 2026-10-24 21:33:12 -05:00
20 changed files with 244 additions and 102 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ do
-- on. There pfUI does load, and will throw wherever it reaches for something -- on. There pfUI does load, and will throw wherever it reaches for something
-- the installed DLL doesn't have yet -- the popup names the cause so those -- the installed DLL doesn't have yet -- the popup names the cause so those
-- errors aren't a mystery. -- errors aren't a mystery.
local PFUI_CLASSIC_API_MIN = 11703 -- (X*10000 + Y*100 + Z) local PFUI_CLASSIC_API_MIN = 11710 -- (X*10000 + Y*100 + Z)
local PFUI_CLASSIC_API_LATEST = PFUI_CLASSIC_API_MIN local PFUI_CLASSIC_API_LATEST = PFUI_CLASSIC_API_MIN
local PFUI_CLASSIC_API_WEBSITE = "https://github.com/brues-code/ClassicAPI" local PFUI_CLASSIC_API_WEBSITE = "https://github.com/brues-code/ClassicAPI"
local PFUI_CLASSIC_API_LATEST_URL = PFUI_CLASSIC_API_WEBSITE .. "/releases/latest" local PFUI_CLASSIC_API_LATEST_URL = PFUI_CLASSIC_API_WEBSITE .. "/releases/latest"
+7
View File
@@ -71,6 +71,8 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("buffs", nil, "debuffrowsize", "16") pfUI:UpdateConfig("buffs", nil, "debuffrowsize", "16")
pfUI:UpdateConfig("buffs", nil, "textinside", "0") pfUI:UpdateConfig("buffs", nil, "textinside", "0")
pfUI:UpdateConfig("buffs", nil, "fontsize", "-1") pfUI:UpdateConfig("buffs", nil, "fontsize", "-1")
pfUI:UpdateConfig("buffs", nil, "cooldown_anim", "1")
pfUI:UpdateConfig("buffs", nil, "cooldown_reverse", "1")
pfUI:UpdateConfig("buffbar", "pbuff", "enable", "0") pfUI:UpdateConfig("buffbar", "pbuff", "enable", "0")
pfUI:UpdateConfig("buffbar", "pbuff", "use_unitfonts", "0") pfUI:UpdateConfig("buffbar", "pbuff", "use_unitfonts", "0")
@@ -174,6 +176,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("appearance", "bags", "abovechat", "0") pfUI:UpdateConfig("appearance", "bags", "abovechat", "0")
pfUI:UpdateConfig("appearance", "bags", "hidechat", "0") pfUI:UpdateConfig("appearance", "bags", "hidechat", "0")
pfUI:UpdateConfig("appearance", "bags", "icon_size", "-1") pfUI:UpdateConfig("appearance", "bags", "icon_size", "-1")
pfUI:UpdateConfig("appearance", "bags", "cooldown_reverse", "0")
pfUI:UpdateConfig("appearance", "bags", "bagrowlength", "10") pfUI:UpdateConfig("appearance", "bags", "bagrowlength", "10")
pfUI:UpdateConfig("appearance", "bags", "bankrowlength", "10") pfUI:UpdateConfig("appearance", "bags", "bankrowlength", "10")
pfUI:UpdateConfig("appearance", "bags", "autoSortOnOpen", "0") pfUI:UpdateConfig("appearance", "bags", "autoSortOnOpen", "0")
@@ -516,6 +519,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", unit, "pspace", "-3") pfUI:UpdateConfig("unitframes", unit, "pspace", "-3")
pfUI:UpdateConfig("unitframes", unit, "cooldown_text", "1") pfUI:UpdateConfig("unitframes", unit, "cooldown_text", "1")
pfUI:UpdateConfig("unitframes", unit, "cooldown_anim", "0") pfUI:UpdateConfig("unitframes", unit, "cooldown_anim", "0")
pfUI:UpdateConfig("unitframes", unit, "cooldown_reverse", "1")
pfUI:UpdateConfig("unitframes", unit, "buffs", "TOPLEFT") pfUI:UpdateConfig("unitframes", unit, "buffs", "TOPLEFT")
pfUI:UpdateConfig("unitframes", unit, "buffsize", "20") pfUI:UpdateConfig("unitframes", unit, "buffsize", "20")
pfUI:UpdateConfig("unitframes", unit, "bufflimit", "32") pfUI:UpdateConfig("unitframes", unit, "bufflimit", "32")
@@ -682,6 +686,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("bars", nil, "bind_size", "8") pfUI:UpdateConfig("bars", nil, "bind_size", "8")
pfUI:UpdateConfig("bars", nil, "bind_color", "1,1,0,1") pfUI:UpdateConfig("bars", nil, "bind_color", "1,1,0,1")
pfUI:UpdateConfig("bars", nil, "cd_size", "12") pfUI:UpdateConfig("bars", nil, "cd_size", "12")
pfUI:UpdateConfig("bars", nil, "cooldown_reverse", "0")
pfUI:UpdateConfig("bars", "gryphons", "texture", "None") pfUI:UpdateConfig("bars", "gryphons", "texture", "None")
pfUI:UpdateConfig("bars", "gryphons", "color", ".6,.6,.6,1") pfUI:UpdateConfig("bars", "gryphons", "color", ".6,.6,.6,1")
@@ -695,6 +700,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("totems", nil, "iconsize", "26") pfUI:UpdateConfig("totems", nil, "iconsize", "26")
pfUI:UpdateConfig("totems", nil, "spacing", "3") pfUI:UpdateConfig("totems", nil, "spacing", "3")
pfUI:UpdateConfig("totems", nil, "showbg", "0") pfUI:UpdateConfig("totems", nil, "showbg", "0")
pfUI:UpdateConfig("totems", nil, "cooldown_reverse", "1")
pfUI:UpdateConfig("panel", nil, "use_unitfonts", "0") pfUI:UpdateConfig("panel", nil, "use_unitfonts", "0")
pfUI:UpdateConfig("panel", nil, "hide_leftchat", "0") pfUI:UpdateConfig("panel", nil, "hide_leftchat", "0")
@@ -942,6 +948,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("nameplates", nil, "debufftimers", "1") pfUI:UpdateConfig("nameplates", nil, "debufftimers", "1")
pfUI:UpdateConfig("nameplates", nil, "debufftext", "1") pfUI:UpdateConfig("nameplates", nil, "debufftext", "1")
pfUI:UpdateConfig("nameplates", nil, "debuffanim", "0") pfUI:UpdateConfig("nameplates", nil, "debuffanim", "0")
pfUI:UpdateConfig("nameplates", nil, "debreverse", "1")
pfUI:UpdateConfig("abuttons", nil, "enable", "1") pfUI:UpdateConfig("abuttons", nil, "enable", "1")
pfUI:UpdateConfig("abuttons", nil, "position", "bottom") pfUI:UpdateConfig("abuttons", nil, "position", "bottom")
+38 -37
View File
@@ -69,6 +69,35 @@ local function LayoutAuras(unit, unitstr)
end end
end end
-- Returns the cooldown start and duration of an aura, 0, 0 when it has none.
-- Start is capped to now: talent-extended auras run past their Spell.dbc base
-- duration, and a start in the future trips the cooldown text's 2^32
-- wraparound branch.
local function AuraTimer(duration, expirationTime)
if expirationTime <= 0 then return 0, 0 end
local now = GetTime()
local start, dur = expirationTime - duration, duration
if start > now or dur <= 0 then
start, dur = now, expirationTime - now
end
if dur <= 0 then return 0, 0 end
return start, dur
end
-- Starts the timers RefreshUnit stored on the shown icons of an aura block.
local function StartAuraTimers(icons)
if not icons then return end
local i = 1
while icons[i] and icons[i]:IsShown() do
local dur = icons[i].auraDuration
CooldownFrame_SetTimer(icons[i].cd, icons[i].auraStart, dur, dur > 0 and 1 or 0)
i = i + 1
end
end
-- ============================================================================ -- ============================================================================
-- GUID-based Roster Tracking for Smart Updates -- GUID-based Roster Tracking for Smart Updates
-- Only updates frames where the unit actually changed, not ALL 40 frames -- Only updates frames where the unit actually changed, not ALL 40 frames
@@ -441,6 +470,7 @@ function pfUI.uf:UpdateConfig()
local cooldown_text = tonumber(f.config.cooldown_text) local cooldown_text = tonumber(f.config.cooldown_text)
local cooldown_anim = tonumber(f.config.cooldown_anim) local cooldown_anim = tonumber(f.config.cooldown_anim)
local cooldown_reverse = tonumber(f.config.cooldown_reverse) or 0
local relative_point = "BOTTOM" local relative_point = "BOTTOM"
if f.config.panchor == "TOPLEFT" then if f.config.panchor == "TOPLEFT" then
@@ -800,6 +830,7 @@ function pfUI.uf:UpdateConfig()
f.buffs[i].cd.pfCooldownType = "ALL" f.buffs[i].cd.pfCooldownType = "ALL"
f.buffs[i].cd.pfCooldownStyleText = cooldown_text f.buffs[i].cd.pfCooldownStyleText = cooldown_text
f.buffs[i].cd.pfCooldownStyleAnimation = cooldown_anim f.buffs[i].cd.pfCooldownStyleAnimation = cooldown_anim
f.buffs[i].cd.pfCooldownReverse = cooldown_reverse
f.buffs[i].cd:SetAlpha(cooldown_anim == 1 and 1 or 0) f.buffs[i].cd:SetAlpha(cooldown_anim == 1 and 1 or 0)
-- immediately show/hide existing cooldown text -- immediately show/hide existing cooldown text
@@ -860,6 +891,7 @@ function pfUI.uf:UpdateConfig()
f.debuffs[i].cd.pfCooldownType = "ALL" f.debuffs[i].cd.pfCooldownType = "ALL"
f.debuffs[i].cd.pfCooldownStyleText = cooldown_text f.debuffs[i].cd.pfCooldownStyleText = cooldown_text
f.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim f.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim
f.debuffs[i].cd.pfCooldownReverse = cooldown_reverse
f.debuffs[i].cd:SetAlpha(cooldown_anim == 1 and 1 or 0) f.debuffs[i].cd:SetAlpha(cooldown_anim == 1 and 1 or 0)
-- immediately show/hide existing cooldown text -- immediately show/hide existing cooldown text
@@ -1711,24 +1743,7 @@ function pfUI.uf:RefreshUnit(unit, component)
unit.buffs[i].stacks:SetText("") unit.buffs[i].stacks:SetText("")
end end
if expirationTime > 0 then unit.buffs[i].auraStart, unit.buffs[i].auraDuration = AuraTimer(duration, expirationTime)
-- pfUI's cooldown text falls into a 2^32 wraparound branch when start > GetTime(),
-- which happens for talent-extended buffs where the real duration exceeds the
-- Spell.dbc base. Anchor start to now in that case to keep the remaining math sane.
local now = GetTime()
local start = expirationTime - duration
local dur = duration
if start > now or dur <= 0 then
start, dur = now, expirationTime - now
end
if dur > 0 then
CooldownFrame_SetTimer(unit.buffs[i].cd, start, dur, 1)
else
CooldownFrame_SetTimer(unit.buffs[i].cd, 0, 0, 0)
end
else
CooldownFrame_SetTimer(unit.buffs[i].cd, 0, 0, 0)
end
else else
unit.buffs[i]:Hide() unit.buffs[i]:Hide()
end end
@@ -1771,24 +1786,7 @@ function pfUI.uf:RefreshUnit(unit, component)
if texture then if texture then
unit.debuffs[i]:Show() unit.debuffs[i]:Show()
if expirationTime > 0 then unit.debuffs[i].auraStart, unit.debuffs[i].auraDuration = AuraTimer(duration, expirationTime)
-- Cap start to now so talent-extended debuffs (expirationTime past
-- the dbc base duration) don't push start into the future and trip
-- CooldownFrame_SetTimer's 2^32-wraparound branch.
local now = GetTime()
local start = expirationTime - duration
local dur = duration
if start > now or dur <= 0 then
start, dur = now, expirationTime - now
end
if dur > 0 then
CooldownFrame_SetTimer(unit.debuffs[i].cd, start, dur, 1)
else
CooldownFrame_SetTimer(unit.debuffs[i].cd, 0, 0, 0)
end
else
CooldownFrame_SetTimer(unit.debuffs[i].cd, 0, 0, 0)
end
if stacks > 1 then if stacks > 1 then
unit.debuffs[i].stacks:SetText(stacks) unit.debuffs[i].stacks:SetText(stacks)
@@ -1806,8 +1804,11 @@ function pfUI.uf:RefreshUnit(unit, component)
end end
end end
-- timers start after the layout so each cooldown text is sized to its icon
if component == "all" or component == "aura" then if component == "all" or component == "aura" then
LayoutAuras(unit, unitstr) LayoutAuras(unit, unitstr)
StartAuraTimers(unit.buffs)
StartAuraTimers(unit.debuffs)
end end
-- indicators -- indicators
@@ -2238,7 +2239,7 @@ function pfUI.uf:AddIcon(frame, pos, icon, timeleft, stacks, start, duration)
if not frame.icon[pos] then if not frame.icon[pos] then
frame.icon[pos] = CreateFrame("Frame", nil, frame.icon) frame.icon[pos] = CreateFrame("Frame", nil, frame.icon)
frame.icon[pos]:SetParent(frame) frame.icon[pos]:SetParent(frame)
frame.icon[pos].tex = frame.icon[pos]:CreateTexture("OVERLAY") frame.icon[pos].tex = frame.icon[pos]:CreateTexture(nil, "OVERLAY")
frame.icon[pos].tex:SetAllPoints(frame.icon[pos]) frame.icon[pos].tex:SetAllPoints(frame.icon[pos])
frame.icon[pos].tex:SetTexCoord(.08, .92, .08, .92) frame.icon[pos].tex:SetTexCoord(.08, .92, .08, .92)
frame.icon[pos].stacks = frame.icon[pos]:CreateFontString(nil, "OVERLAY") frame.icon[pos].stacks = frame.icon[pos]:CreateFontString(nil, "OVERLAY")
+1
View File
@@ -1045,6 +1045,7 @@ pfUI:RegisterModule("actionbar", function ()
-- cooldown -- cooldown
f.cd = CreateFrame("Cooldown", f:GetName() .. "Cooldown", f, "CooldownFrameTemplate") f.cd = CreateFrame("Cooldown", f:GetName() .. "Cooldown", f, "CooldownFrameTemplate")
f.cd.pfCooldownStyleAnimation = 1 f.cd.pfCooldownStyleAnimation = 1
f.cd.pfCooldownReverse = tonumber(C.bars.cooldown_reverse) or 0
f.cd.pfCooldownType = "NOGCD" f.cd.pfCooldownType = "NOGCD"
f.cd.pfCooldownSize = cd_size f.cd.pfCooldownSize = cd_size
+1 -1
View File
@@ -57,7 +57,7 @@ pfUI:RegisterModule("autovendor", function ()
-- Setup Autosell button -- Setup Autosell button
autovendor.button = CreateFrame("Button", "pfMerchantAutoVendorButton", MerchantFrame) autovendor.button = CreateFrame("Button", "pfMerchantAutoVendorButton", MerchantFrame)
autovendor.button:SetSize(36, 36) autovendor.button:SetSize(36, 36)
autovendor.button.icon = autovendor.button:CreateTexture("ARTWORK") autovendor.button.icon = autovendor.button:CreateTexture(nil, "ARTWORK")
autovendor.button.icon:SetTexture("Interface\\Icons\\Spell_Shadow_SacrificialShield") autovendor.button.icon:SetTexture("Interface\\Icons\\Spell_Shadow_SacrificialShield")
autovendor.button:SetScript("OnEnter", function() autovendor.button:SetScript("OnEnter", function()
GameTooltip:SetOwner(this, "ANCHOR_RIGHT") GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
+2
View File
@@ -398,11 +398,13 @@ pfUI:RegisterModule("bags", function ()
local name = "pfBag" .. bag .. "item" .. slot .. "Cooldown" local name = "pfBag" .. bag .. "item" .. slot .. "Cooldown"
bankslot.cd = CreateFrame("Cooldown", name, bankslot, "CooldownFrameTemplate") bankslot.cd = CreateFrame("Cooldown", name, bankslot, "CooldownFrameTemplate")
bankslot.cd.pfCooldownStyleAnimation = 1 bankslot.cd.pfCooldownStyleAnimation = 1
bankslot.cd.pfCooldownReverse = tonumber(C.appearance.bags.cooldown_reverse) or 0
bankslot.cd.pfCooldownType = "NOGCD" bankslot.cd.pfCooldownType = "NOGCD"
else else
local bagslot = pfUI.bags[bag].slots[slot].frame local bagslot = pfUI.bags[bag].slots[slot].frame
bagslot.cd = _G[bagslot:GetName().."Cooldown"] bagslot.cd = _G[bagslot:GetName().."Cooldown"]
bagslot.cd.pfCooldownType = "NOGCD" bagslot.cd.pfCooldownType = "NOGCD"
bagslot.cd.pfCooldownReverse = tonumber(C.appearance.bags.cooldown_reverse) or 0
end end
if not pfUI.bags[bag].slots[slot].frame.backdrop then if not pfUI.bags[bag].slots[slot].frame.backdrop then
+43 -3
View File
@@ -33,7 +33,7 @@ pfUI:RegisterModule("buff", function ()
end end
local slots = buff.btype == "HELPFUL" and helpfulSlots or harmfulSlots local slots = buff.btype == "HELPFUL" and helpfulSlots or harmfulSlots
local name, icon, count, dispelType, _, expirationTime, _, _, _, spellId = C_UnitAuras.UnitAuraBySlot("player", slots[buff.id]) local name, icon, count, dispelType, duration, expirationTime, _, _, _, spellId = C_UnitAuras.UnitAuraBySlot("player", slots[buff.id])
--detect weapon buffs --detect weapon buffs
if buff.btype == "HELPFUL" and ((C.buffs.separateweapons == "0" and buff.gid <= pfUI.buff.wepbuffs.count) or (pfUI.buff.wepbuffs.count > 0 and buff.weapon ~= nil)) then if buff.btype == "HELPFUL" and ((C.buffs.separateweapons == "0" and buff.gid <= pfUI.buff.wepbuffs.count) or (pfUI.buff.wepbuffs.count > 0 and buff.weapon ~= nil)) then
@@ -84,6 +84,28 @@ pfUI:RegisterModule("buff", function ()
return return
end end
-- drive the sweep from the aura duration (weapon enchants and permanent
-- auras report no usable total, so those buttons stay text-only)
if buff.mode == buff.btype and duration and duration > 0 and expirationTime and expirationTime > 0 then
local now = GetTime()
local timeleft = expirationTime - now
if timeleft > 0 then
local effDuration = duration > timeleft and duration or timeleft
local newStart = now + timeleft - effDuration
if buff.cdStart == nil or abs(buff.cdStart - newStart) > .5 or buff.cdDuration ~= effDuration then
CooldownFrame_SetTimer(buff.cd, newStart, effDuration, 1)
buff.cdStart = newStart
buff.cdDuration = effDuration
end
else
CooldownFrame_SetTimer(buff.cd, 0, 0, 0)
buff.cdStart = nil
end
else
CooldownFrame_SetTimer(buff.cd, 0, 0, 0)
buff.cdStart = nil
end
buff:Show() buff:Show()
end end
@@ -106,17 +128,33 @@ pfUI:RegisterModule("buff", function ()
buff.texture:SetTexCoord(.07,.93,.07,.93) buff.texture:SetTexCoord(.07,.93,.07,.93)
buff.texture:SetAllPoints(buff) buff.texture:SetAllPoints(buff)
buff.timer = buff:CreateFontString(nil, "OVERLAY", "GameFontNormal") -- overlay lifts the texts above the sweep: a child frame renders above
-- all of its parent's own regions, so the timer would dim under the
-- dark wedge otherwise (same reason pfCooldownText is its own frame)
buff.overlay = CreateFrame("Frame", nil, buff)
buff.overlay:SetAllPoints(buff)
buff.timer = buff.overlay:CreateFontString(nil, "OVERLAY", "GameFontNormal")
buff.timer:SetTextColor(1,1,1,1) buff.timer:SetTextColor(1,1,1,1)
buff.timer:SetJustifyH("CENTER") buff.timer:SetJustifyH("CENTER")
buff.timer:SetJustifyV("CENTER") buff.timer:SetJustifyV("CENTER")
buff.stacks = buff:CreateFontString(nil, "OVERLAY", "GameFontNormal") buff.stacks = buff.overlay:CreateFontString(nil, "OVERLAY", "GameFontNormal")
buff.stacks:SetTextColor(1,1,1,1) buff.stacks:SetTextColor(1,1,1,1)
buff.stacks:SetJustifyH("RIGHT") buff.stacks:SetJustifyH("RIGHT")
buff.stacks:SetJustifyV("BOTTOM") buff.stacks:SetJustifyV("BOTTOM")
buff.stacks:SetAllPoints(buff) buff.stacks:SetAllPoints(buff)
-- radial sweep (the template covers the button and starts hidden;
-- the cooldown hook drives it from here, text stays with buff.timer)
buff.cd = CreateFrame("Cooldown", buttonName .. "Cooldown", buff, "CooldownFrameTemplate")
buff.cd:SetFrameLevel(buff:GetFrameLevel() + 1)
buff.overlay:SetFrameLevel(buff:GetFrameLevel() + 2)
buff.cd.pfCooldownType = "ALL"
buff.cd.pfCooldownStyleText = 0
buff.cd.pfCooldownStyleAnimation = tonumber(C.buffs.cooldown_anim) or 0
buff.cd.pfCooldownReverse = tonumber(C.buffs.cooldown_reverse) or 0
buff:RegisterForClicks("RightButtonUp") buff:RegisterForClicks("RightButtonUp")
buff.weapon = weapon buff.weapon = weapon
@@ -307,6 +345,8 @@ pfUI:RegisterModule("buff", function ()
offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+buffSize+2*buffSpacing) offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+buffSize+2*buffSpacing)
end end
buff:SetSize(buffSize, buffSize) buff:SetSize(buffSize, buffSize)
buff.cd.pfCooldownStyleAnimation = tonumber(C.buffs.cooldown_anim) or 0
buff.cd.pfCooldownReverse = tonumber(C.buffs.cooldown_reverse) or 0
buff:ClearAllPoints() buff:ClearAllPoints()
buff:SetPoint("TOPRIGHT", relFrame, "TOPRIGHT",offsetX, offsetY) buff:SetPoint("TOPRIGHT", relFrame, "TOPRIGHT",offsetX, offsetY)
+1 -1
View File
@@ -23,7 +23,7 @@ pfUI:RegisterModule("combopoints", function ()
pfUI.combopoints[point]:SetPoint("CENTER", UIParent, "CENTER", (point - 3) * (combo_width + border*3), 10 ) pfUI.combopoints[point]:SetPoint("CENTER", UIParent, "CENTER", (point - 3) * (combo_width + border*3), 10 )
end end
pfUI.combopoints[point].tex = pfUI.combopoints[point]:CreateTexture("OVERLAY") pfUI.combopoints[point].tex = pfUI.combopoints[point]:CreateTexture(nil, "OVERLAY")
pfUI.combopoints[point].tex:SetAllPoints(pfUI.combopoints[point]) pfUI.combopoints[point].tex:SetAllPoints(pfUI.combopoints[point])
if point < 3 then if point < 3 then
+32 -13
View File
@@ -59,18 +59,14 @@ pfUI:RegisterModule("cooldown", function ()
end end
end end
local height, size local function GetCooldownHeight(cooldown)
local textcount = 0 return cooldown:GetParent() and cooldown:GetParent():GetHeight() or cooldown:GetHeight() or 0
local function pfCreateCoolDown(cooldown, start, duration) end
textcount = textcount + 1
local name = cooldown.GetName and cooldown:GetName() or "pfCooldown" .. textcount
cooldown.pfCooldownText = CreateFrame("Frame", name .. "Text", cooldown:GetParent())
cooldown.pfCooldownText.cooldown = cooldown
cooldown.pfCooldownText:SetAllPoints(cooldown)
cooldown.pfCooldownText:SetFrameLevel(cooldown:GetParent():GetFrameLevel() + 2)
cooldown.pfCooldownText.text = cooldown.pfCooldownText:CreateFontString(name .. "TextString", "OVERLAY")
-- sizes the text to the cooldown's current height; the dynamic size follows
-- the frame, so SetCooldown calls this again whenever that height changes
local function pfUpdateCooldownFont(cooldown)
local size
if not cooldown.pfCooldownType then if not cooldown.pfCooldownType then
size = tonumber(C.appearance.cd.font_size_foreign) size = tonumber(C.appearance.cd.font_size_foreign)
elseif cooldown.pfCooldownType == "BLIZZARD" then elseif cooldown.pfCooldownType == "BLIZZARD" then
@@ -82,12 +78,27 @@ pfUI:RegisterModule("cooldown", function ()
end end
-- enforce dynamic font size -- enforce dynamic font size
if C.appearance.cd.dynamicsize == "1" and cooldown.GetParent then if C.appearance.cd.dynamicsize == "1" then
height = cooldown:GetParent() and cooldown:GetParent():GetHeight() or cooldown:GetHeight() or 0 local height = GetCooldownHeight(cooldown)
cooldown.pfCooldownText.height = height
size = math.max((height > 0 and height * .64 or 16), size) size = math.max((height > 0 and height * .64 or 16), size)
end end
cooldown.pfCooldownText.text:SetFont(pfUI.media[C.appearance.cd.font], size, "OUTLINE") cooldown.pfCooldownText.text:SetFont(pfUI.media[C.appearance.cd.font], size, "OUTLINE")
end
local textcount = 0
local function pfCreateCoolDown(cooldown, start, duration)
textcount = textcount + 1
local name = cooldown.GetName and cooldown:GetName() or "pfCooldown" .. textcount
cooldown.pfCooldownText = CreateFrame("Frame", name .. "Text", cooldown:GetParent())
cooldown.pfCooldownText.cooldown = cooldown
cooldown.pfCooldownText:SetAllPoints(cooldown)
cooldown.pfCooldownText:SetFrameLevel(cooldown:GetParent():GetFrameLevel() + 2)
cooldown.pfCooldownText.text = cooldown.pfCooldownText:CreateFontString(name .. "TextString", "OVERLAY")
pfUpdateCooldownFont(cooldown)
cooldown.pfCooldownText.text:SetPoint("CENTER", cooldown.pfCooldownText, "CENTER", 0, 0) cooldown.pfCooldownText.text:SetPoint("CENTER", cooldown.pfCooldownText, "CENTER", 0, 0)
cooldown.pfCooldownText:SetScript("OnUpdate", pfCooldownOnUpdate) cooldown.pfCooldownText:SetScript("OnUpdate", pfCooldownOnUpdate)
end end
@@ -131,11 +142,19 @@ pfUI:RegisterModule("cooldown", function ()
this:SetAlpha(0) this:SetAlpha(0)
end end
-- reversed sweep direction (ClassicAPI backports SetReverse with the
-- modern Cooldown frame; stock Model swipes don't have it, so guard it)
if this.pfCooldownReverse == 1 and this.SetReverse then
this:SetReverse(true)
end
-- print time as text on cooldown frames -- print time as text on cooldown frames
if ( not this.pfCooldownStyleText or this.pfCooldownStyleText == 1) if ( not this.pfCooldownStyleText or this.pfCooldownStyleText == 1)
and start > 0 and duration > 0 and (not enable or enable > 0) then and start > 0 and duration > 0 and (not enable or enable > 0) then
if( not this.pfCooldownText ) then if( not this.pfCooldownText ) then
pfCreateCoolDown(this, start, duration) pfCreateCoolDown(this, start, duration)
elseif C.appearance.cd.dynamicsize == "1" and GetCooldownHeight(this) ~= this.pfCooldownText.height then
pfUpdateCooldownFont(this)
end end
this.pfCooldownText.start = start this.pfCooldownText.start = start
+8 -1
View File
@@ -183,7 +183,7 @@ pfUI:RegisterModule("gui", function ()
frame.color:SetHeight(12) frame.color:SetHeight(12)
CreateBackdrop(frame.color) CreateBackdrop(frame.color)
frame.color:SetPoint("RIGHT" , -5, 1) frame.color:SetPoint("RIGHT" , -5, 1)
frame.color.prev = frame.color.backdrop:CreateTexture("OVERLAY") frame.color.prev = frame.color.backdrop:CreateTexture(nil, "OVERLAY")
frame.color.prev:SetAllPoints(frame.color) frame.color.prev:SetAllPoints(frame.color)
local cr, cg, cb, ca = strsplit(",", category[config]) local cr, cg, cb, ca = strsplit(",", category[config])
@@ -2341,6 +2341,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U[c], T["Timer"], nil, nil, "header") CreateConfig(U[c], T["Timer"], nil, nil, "header")
CreateConfig(U[c], T["Show Timer Text"], C.unitframes[c], "cooldown_text", "checkbox") CreateConfig(U[c], T["Show Timer Text"], C.unitframes[c], "cooldown_text", "checkbox")
CreateConfig(Reload, T["Show Timer Animation"], C.unitframes[c], "cooldown_anim", "checkbox") CreateConfig(Reload, T["Show Timer Animation"], C.unitframes[c], "cooldown_anim", "checkbox")
CreateConfig(Reload, T["Reverse Timer Animation"], C.unitframes[c], "cooldown_reverse", "checkbox")
CreateConfig(U[c], T["Buffs"], nil, nil, "header") CreateConfig(U[c], T["Buffs"], nil, nil, "header")
CreateConfig(U[c], T["Buff Position"], C.unitframes[c], "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position) CreateConfig(U[c], T["Buff Position"], C.unitframes[c], "buffs", "dropdown", pfUI.gui.dropdowns.uf_buff_position)
@@ -2445,6 +2446,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(nil, T["Bankslots Per Row"], C.appearance.bags, "bankrowlength") CreateConfig(nil, T["Bankslots Per Row"], C.appearance.bags, "bankrowlength")
CreateConfig(nil, T["Enable Full-Text Search"], C.appearance.bags, "fulltext") CreateConfig(nil, T["Enable Full-Text Search"], C.appearance.bags, "fulltext")
CreateConfig(nil, T["Item Slot Size"], C.appearance.bags, "icon_size") CreateConfig(nil, T["Item Slot Size"], C.appearance.bags, "icon_size")
CreateConfig(Reload, T["Reverse Cooldown Animation"], C.appearance.bags, "cooldown_reverse", "checkbox")
CreateConfig(nil, T["Auto Sell Grey Items"], C.global, "autosell", "checkbox") CreateConfig(nil, T["Auto Sell Grey Items"], C.global, "autosell", "checkbox")
CreateConfig(nil, T["Auto Repair Items"], C.global, "autorepair", "checkbox") CreateConfig(nil, T["Auto Repair Items"], C.global, "autorepair", "checkbox")
CreateConfig(nil, T["Auto Sort When Opening Bags"], C.appearance.bags, "autoSortOnOpen", "checkbox") CreateConfig(nil, T["Auto Sort When Opening Bags"], C.appearance.bags, "autoSortOnOpen", "checkbox")
@@ -2495,6 +2497,8 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U["buff"], T["Number Of Debuffs Per Row"], C.buffs, "debuffrowsize") CreateConfig(U["buff"], T["Number Of Debuffs Per Row"], C.buffs, "debuffrowsize")
CreateConfig(U["buff"], T["Show Duration Inside Buff"], C.buffs, "textinside", "checkbox") CreateConfig(U["buff"], T["Show Duration Inside Buff"], C.buffs, "textinside", "checkbox")
CreateConfig(U["buff"], T["Buff Font Size"], C.buffs, "fontsize") CreateConfig(U["buff"], T["Buff Font Size"], C.buffs, "fontsize")
CreateConfig(Reload, T["Show Timer Animation"], C.buffs, "cooldown_anim", "checkbox")
CreateConfig(Reload, T["Reverse Timer Animation"], C.buffs, "cooldown_reverse", "checkbox")
end) end)
CreateGUIEntry(T["Buffs"], T["Totem Icons"], function() CreateGUIEntry(T["Buffs"], T["Totem Icons"], function()
@@ -2502,6 +2506,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U["totems"], T["Icon Size"], C.totems, "iconsize") CreateConfig(U["totems"], T["Icon Size"], C.totems, "iconsize")
CreateConfig(U["totems"], T["Spacing"], C.totems, "spacing", "dropdown", pfUI.gui.dropdowns.spacing) CreateConfig(U["totems"], T["Spacing"], C.totems, "spacing", "dropdown", pfUI.gui.dropdowns.spacing)
CreateConfig(U["totems"], T["Show Background"], C.totems, "showbg", "checkbox") CreateConfig(U["totems"], T["Show Background"], C.totems, "showbg", "checkbox")
CreateConfig(Reload, T["Reverse Cooldown Animation"], C.totems, "cooldown_reverse", "checkbox")
end) end)
CreateGUIEntry(T["Buffs"], T["Player Buff Bar"], function() CreateGUIEntry(T["Buffs"], T["Player Buff Bar"], function()
@@ -2591,6 +2596,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U["bars"], T["Keybind Text Size"], C.bars, "bind_size") CreateConfig(U["bars"], T["Keybind Text Size"], C.bars, "bind_size")
CreateConfig(U["bars"], T["Keybind Text Color"], C.bars, "bind_color", "color") CreateConfig(U["bars"], T["Keybind Text Color"], C.bars, "bind_color", "color")
CreateConfig(nil, T["Cooldown Text Size"], C.bars, "cd_size") CreateConfig(nil, T["Cooldown Text Size"], C.bars, "cd_size")
CreateConfig(Reload, T["Reverse Cooldown Animation"], C.bars, "cooldown_reverse", "checkbox")
CreateConfig(nil, T["Auto Paging"], nil, nil, "header") CreateConfig(nil, T["Auto Paging"], nil, nil, "header")
CreateConfig(U["bars"], T["Switch Pages On Alt Key Press"], C.bars, "pagemasteralt", "checkbox") CreateConfig(U["bars"], T["Switch Pages On Alt Key Press"], C.bars, "pagemasteralt", "checkbox")
@@ -2960,6 +2966,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(U["nameplates"], T["Enable Debuff Timers"], C.nameplates, "debufftimers", "checkbox") CreateConfig(U["nameplates"], T["Enable Debuff Timers"], C.nameplates, "debufftimers", "checkbox")
CreateConfig(U["nameplates"], T["Show Timer Text"], C.nameplates, "debufftext", "checkbox") CreateConfig(U["nameplates"], T["Show Timer Text"], C.nameplates, "debufftext", "checkbox")
CreateConfig(Reload, T["Show Timer Animation"], C.nameplates, "debuffanim", "checkbox") CreateConfig(Reload, T["Show Timer Animation"], C.nameplates, "debuffanim", "checkbox")
CreateConfig(Reload, T["Reverse Timer Animation"], C.nameplates, "debreverse", "checkbox")
CreateConfig(U["nameplates"], T["Filter Mode"], C.nameplates.debuffs, "filter", "dropdown", pfUI.gui.dropdowns.buffbarfilter) CreateConfig(U["nameplates"], T["Filter Mode"], C.nameplates.debuffs, "filter", "dropdown", pfUI.gui.dropdowns.buffbarfilter)
CreateConfig(U["nameplates"], T["Blacklist"], C.nameplates.debuffs, "blacklist", "list") CreateConfig(U["nameplates"], T["Blacklist"], C.nameplates.debuffs, "blacklist", "list")
+35 -23
View File
@@ -31,7 +31,6 @@ pfUI:RegisterModule("mapreveal", function ()
end) end)
local explorecaches = {} local explorecaches = {}
local alreadyknown = {} -- per-zone accumulator: { [zone] = { [texName] = true } }
-- Own texture pool - separate from Blizzard's WorldMapOverlay textures -- Own texture pool - separate from Blizzard's WorldMapOverlay textures
local overlayPool = CreateTexturePool(WorldMapDetailFrame, "BORDER", nil, nil, function(_, tex) local overlayPool = CreateTexturePool(WorldMapDetailFrame, "BORDER", nil, nil, function(_, tex)
@@ -93,43 +92,45 @@ pfUI:RegisterModule("mapreveal", function ()
-- clear stale caches -- clear stale caches
for k in pairs(explorecaches) do explorecaches[k] = nil end for k in pairs(explorecaches) do explorecaches[k] = nil end
-- hide all our textures from last frame -- hide all our textures and icons from last frame
overlayPool:ReleaseAll() overlayPool:ReleaseAll()
explorePool:ReleaseAll()
local showExplore = C.appearance.worldmap.mapexploration == "1"
local showReveal = C.appearance.worldmap.mapreveal == "1"
if not showExplore and not showReveal then return end
local r,g,b,a = GetStringColor(C.appearance.worldmap.mapreveal_color) local r,g,b,a = GetStringColor(C.appearance.worldmap.mapreveal_color)
local mapFileName = GetMapInfo() local mapFileName = GetMapInfo()
if not mapFileName then mapFileName = "World" end if not mapFileName then mapFileName = "World" end
local numOverlays = GetNumMapOverlays()
-- accumulate explored overlays per zone (never clear, only add)
if not alreadyknown[mapFileName] then alreadyknown[mapFileName] = {} end
for i = 1, numOverlays do
local texName = GetMapOverlayInfo(i)
if texName then alreadyknown[mapFileName][string.upper(texName)] = true end
end
local zoneKnown = alreadyknown[mapFileName]
-- hide explore icons
explorePool:ReleaseAll()
-- ClassicAPI: full overlay list for the viewed zone (explored + unexplored), -- ClassicAPI: full overlay list for the viewed zone (explored + unexplored),
-- read straight from WorldMapOverlay.dbc. Replaces the hand-measured pfMapOverlayData. -- read straight from WorldMapOverlay.dbc. Replaces the hand-measured pfMapOverlayData.
local zoneData = C_Map.GetMapOverlays() or {} local zoneData = C_Map.GetMapOverlays() or {}
-- ClassicAPI: the unexplored subset of the viewed zone, using the engine's
-- own explored-bit test. Replaces the alreadyknown accumulator, which
-- replayed the explored-only GetMapOverlayInfo view. Keyed by the bare
-- texture name, the same key the icon cache below uses.
local unknown = {}
if showExplore then
for _, overlay in ipairs(C_MapExplorationInfo.GetUnexploredMapTextures() or {}) do
if overlay.textureName and overlay.textureName ~= "" then
unknown[string.upper(overlay.textureName)] = true
end
end
end
for _, overlay in ipairs(zoneData) do for _, overlay in ipairs(zoneData) do
local name = overlay.textureName -- bare, e.g. "DRYGULCHRAVINE" local name = overlay.textureName -- bare, e.g. "DRYGULCHRAVINE"
local textureName = overlay.texturePath -- full engine path (for SetTexture)
local textureWidth = overlay.textureWidth local textureWidth = overlay.textureWidth
local textureHeight = overlay.textureHeight local textureHeight = overlay.textureHeight
local offsetX = overlay.offsetX local offsetX = overlay.offsetX
local offsetY = overlay.offsetY local offsetY = overlay.offsetY
-- explore magnifying glass icon. `alreadyknown` stores the FULL paths -- explore magnifying glass icon for overlays the engine still
-- GetMapOverlayInfo returns, so compare with the full path, not the bare -- counts as unexplored.
-- name. if showExplore and unknown[string.upper(name)] then
if C.appearance.worldmap.mapexploration == "1" and not zoneKnown[string.upper(textureName)] then
local explore = explorePool:Acquire() local explore = explorePool:Acquire()
explore:SetPoint("TOPLEFT", "WorldMapDetailFrame", "TOPLEFT", offsetX + textureWidth/2, -offsetY - textureHeight/2) explore:SetPoint("TOPLEFT", "WorldMapDetailFrame", "TOPLEFT", offsetX + textureWidth/2, -offsetY - textureHeight/2)
explore.name = mapFileName .. " (" .. name .. ")" explore.name = mapFileName .. " (" .. name .. ")"
@@ -147,7 +148,7 @@ pfUI:RegisterModule("mapreveal", function ()
-- disambiguated from the actual BLP dimensions. No 256px grid -- disambiguated from the actual BLP dimensions. No 256px grid
-- math here — deriving the grid from textureWidth/Height is -- math here — deriving the grid from textureWidth/Height is
-- exactly what shears quirky overlays (e.g. Icepoint's Kaneq'nuun). -- exactly what shears quirky overlays (e.g. Icepoint's Kaneq'nuun).
if C.appearance.worldmap.mapreveal == "1" then if showReveal then
for _, tile in ipairs(overlay.tiles) do for _, tile in ipairs(overlay.tiles) do
local tex = overlayPool:Acquire() local tex = overlayPool:Acquire()
@@ -174,4 +175,15 @@ pfUI:RegisterModule("mapreveal", function ()
pfWorldMapFrame_Update() pfWorldMapFrame_Update()
end end
end) -- live refresh while the map is open: exploration changes arrive on this
-- event. Zone switches, zoom and (re)opens still come through the hook
-- above, so nothing is redrawn while the map is closed — the next open
-- rebuilds from the current state.
EventRegistry:RegisterFrameEventAndCallback("MAP_EXPLORATION_UPDATED", function()
if WorldMapFrame and WorldMapFrame:IsShown() then
pfWorldMapFrame_Update()
end
end)
end)
+1 -1
View File
@@ -103,7 +103,7 @@ pfUI:RegisterModule("minimap", function ()
this.highlight:SetAllPoints(this) this.highlight:SetAllPoints(this)
this.highlight:SetFrameLevel(this:GetFrameLevel() + 1) this.highlight:SetFrameLevel(this:GetFrameLevel() + 1)
this.highlight.tex = this.highlight:CreateTexture("OVERLAY") this.highlight.tex = this.highlight:CreateTexture(nil, "OVERLAY")
this.highlight.tex:SetTexture(pfUI.media["img:mail"]) this.highlight.tex:SetTexture(pfUI.media["img:mail"])
this.highlight.tex:SetPoint("TOPLEFT", MiniMapMailIcon, "TOPLEFT", -2, 2) this.highlight.tex:SetPoint("TOPLEFT", MiniMapMailIcon, "TOPLEFT", -2, 2)
this.highlight.tex:SetPoint("BOTTOMRIGHT", MiniMapMailIcon, "BOTTOMRIGHT", 2, -2) this.highlight.tex:SetPoint("BOTTOMRIGHT", MiniMapMailIcon, "BOTTOMRIGHT", 2, -2)
+16 -10
View File
@@ -130,8 +130,8 @@ pfUI:RegisterModule("nameplates", function ()
cfg.targetcastbar = C.nameplates["targetcastbar"] == "1" cfg.targetcastbar = C.nameplates["targetcastbar"] == "1"
cfg.notargalpha = tonumber(C.nameplates.notargalpha) or 0.5 cfg.notargalpha = tonumber(C.nameplates.notargalpha) or 0.5
if cfg.notargalpha > 1 then cfg.notargalpha = cfg.notargalpha / 100 end if cfg.notargalpha > 1 then cfg.notargalpha = cfg.notargalpha / 100 end
-- Clamp to 0.99 so non-target plates never reach 1.0 (used for target detection) -- Clamp to 1.0 so a 100% setting yields full opacity (target detection is GUID-based)
if cfg.notargalpha > 0.99 then cfg.notargalpha = 0.99 end if cfg.notargalpha > 1 then cfg.notargalpha = 1 end
cfg.namefightcolor = C.nameplates.namefightcolor == "1" cfg.namefightcolor = C.nameplates.namefightcolor == "1"
cfg.spellname = C.nameplates.spellname == "1" cfg.spellname = C.nameplates.spellname == "1"
cfg.showhp = C.nameplates.showhp == "1" cfg.showhp = C.nameplates.showhp == "1"
@@ -159,6 +159,7 @@ pfUI:RegisterModule("nameplates", function ()
cfg.debufftimers = C.nameplates.debufftimers == "1" cfg.debufftimers = C.nameplates.debufftimers == "1"
cfg.debuffanim = tonumber(C.nameplates.debuffanim) or 0 cfg.debuffanim = tonumber(C.nameplates.debuffanim) or 0
cfg.debufftext = tonumber(C.nameplates.debufftext) or 1 cfg.debufftext = tonumber(C.nameplates.debufftext) or 1
cfg.debreverse = tonumber(C.nameplates.debreverse) or 0
-- Throttle delays, resolved once instead of per plate per tick. -- Throttle delays, resolved once instead of per plate per tick.
-- libthrottle:Get walks the saved-variable table, a defaults fallback and a -- libthrottle:Get walks the saved-variable table, a defaults fallback and a
@@ -445,6 +446,7 @@ pfUI:RegisterModule("nameplates", function ()
-- Set initial config flags (will be cached per-cooldown later) -- Set initial config flags (will be cached per-cooldown later)
plate.debuffs[index].cd.pfCooldownStyleAnimation = cfg.debuffanim plate.debuffs[index].cd.pfCooldownStyleAnimation = cfg.debuffanim
plate.debuffs[index].cd.pfCooldownReverse = cfg.debreverse or 0
plate.debuffs[index].cd.pfCooldownStyleText = cfg.debufftext plate.debuffs[index].cd.pfCooldownStyleText = cfg.debufftext
plate.debuffs[index].cd.pfCooldownType = "ALL" plate.debuffs[index].cd.pfCooldownType = "ALL"
end end
@@ -486,6 +488,7 @@ pfUI:RegisterModule("nameplates", function ()
local cooldown_anim = tonumber(C.nameplates.debuffanim) or 0 local cooldown_anim = tonumber(C.nameplates.debuffanim) or 0
nameplate.debuffs[i].cd.pfCooldownStyleText = cooldown_text nameplate.debuffs[i].cd.pfCooldownStyleText = cooldown_text
nameplate.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim nameplate.debuffs[i].cd.pfCooldownStyleAnimation = cooldown_anim
nameplate.debuffs[i].cd.pfCooldownReverse = tonumber(C.nameplates.debreverse) or 0
end end
end end
@@ -524,9 +527,11 @@ nameplates:RegisterUnitEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "target", "focu
end end
-- The plates hold their own unit subscriptions now, so silencing this -- The plates hold their own unit subscriptions now, so silencing this
-- frame alone would leave them dispatching through logout -- exactly what -- frame alone would leave them dispatching through logout -- exactly what
-- this branch exists to prevent. -- this branch exists to prevent. Leaving the world destroys the units
-- before PLAYER_LOGOUT fires, and a destroyed plate already dropped its
-- events and lost its methods, so only the live ones need silencing.
for plate in pairs(registry) do for plate in pairs(registry) do
if plate.nameplate then if plate.nameplate and plate.nameplate.UnregisterAllEvents then
plate.nameplate:UnregisterAllEvents() plate.nameplate:UnregisterAllEvents()
plate.nameplate:SetScript("OnEvent", nil) plate.nameplate:SetScript("OnEvent", nil)
end end
@@ -863,7 +868,7 @@ nameplates:RegisterUnitEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "target", "focu
combopoints[i] = CreateFrame("Frame", nil, nameplate) combopoints[i] = CreateFrame("Frame", nil, nameplate)
combopoints[i]:Hide() combopoints[i]:Hide()
combopoints[i]:SetFrameLevel(8) combopoints[i]:SetFrameLevel(8)
combopoints[i].tex = combopoints[i]:CreateTexture("OVERLAY") combopoints[i].tex = combopoints[i]:CreateTexture(nil, "OVERLAY")
combopoints[i].tex:SetAllPoints() combopoints[i].tex:SetAllPoints()
if i < 3 then if i < 3 then
@@ -1394,12 +1399,14 @@ nameplates:RegisterUnitEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "target", "focu
local cd = plate.debuffs[index].cd local cd = plate.debuffs[index].cd
cd:Show() cd:Show()
if not cachedStart or abs(cachedStart - newStart) > 0.5 then if not cachedStart or abs(cachedStart - newStart) > 0.5 then
if not cd.configCached or cd.cachedAnim ~= cfg.debuffanim or cd.cachedText ~= cfg.debufftext then if not cd.configCached or cd.cachedAnim ~= cfg.debuffanim or cd.cachedText ~= cfg.debufftext or cd.cachedReverse ~= cfg.debreverse then
cd.pfCooldownStyleAnimation = cfg.debuffanim cd.pfCooldownStyleAnimation = cfg.debuffanim
cd.pfCooldownStyleText = cfg.debufftext cd.pfCooldownStyleText = cfg.debufftext
cd.pfCooldownReverse = cfg.debreverse or 0
cd:SetAlpha(cfg.debuffanim == 1 and 1 or 0) cd:SetAlpha(cfg.debuffanim == 1 and 1 or 0)
cd.cachedAnim = cfg.debuffanim cd.cachedAnim = cfg.debuffanim
cd.cachedText = cfg.debufftext cd.cachedText = cfg.debufftext
cd.cachedReverse = cfg.debreverse
cd.configCached = true cd.configCached = true
end end
CooldownFrame_SetTimer(cd, newStart, effDuration, 1) CooldownFrame_SetTimer(cd, newStart, effDuration, 1)
@@ -1443,11 +1450,10 @@ nameplates:RegisterUnitEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "target", "focu
if not hasEventUpdate and (nameplate.lasttick or 0) + cfg.throttle_min > now then return end if not hasEventUpdate and (nameplate.lasttick or 0) + cfg.throttle_min > now then return end
-- PERF: Intelligent throttling based on target/castbar status and plate count -- PERF: Intelligent throttling based on target/castbar status and plate count
-- Use GUID comparison as primary target detection: instant, immune to alpha transitions, -- Use GUID comparison for target detection: instant, immune to alpha transitions,
-- and immediately correct on de-target (unlike istarget which updates one tick later) -- and immediately correct on de-target (unlike istarget which updates one tick later)
local targetGuid = state and state.targetGuid local targetGuid = state and state.targetGuid
local target = (targetGuid and nameplate.cachedGuid and targetGuid == nameplate.cachedGuid) or local target = (targetGuid and nameplate.cachedGuid and targetGuid == nameplate.cachedGuid) or nil
(state and state.targetGuid and frame:GetAlpha() >= 0.99) or nil
-- Target plate castbar runs on its own dedicated frame (nameplates.castbarFrame). -- Target plate castbar runs on its own dedicated frame (nameplates.castbarFrame).
-- For non-target plates with castbar active, use castbar throttle to ensure -- For non-target plates with castbar active, use castbar throttle to ensure
-- smooth animation without overloading the central loop. -- smooth animation without overloading the central loop.
@@ -1965,4 +1971,4 @@ nameplates:RegisterUnitEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "target", "focu
end) end)
pfUI.nameplates = nameplates pfUI.nameplates = nameplates
end) end)
+1 -1
View File
@@ -25,7 +25,7 @@ pfUI:RegisterModule("nampower", function ()
pfUI.spellqueue:SetPoint("CENTER", UIParent, "CENTER", 100, -100) pfUI.spellqueue:SetPoint("CENTER", UIParent, "CENTER", 100, -100)
end end
pfUI.spellqueue.icon = pfUI.spellqueue:CreateTexture("OVERLAY") pfUI.spellqueue.icon = pfUI.spellqueue:CreateTexture(nil, "OVERLAY")
pfUI.spellqueue.icon:SetAllPoints(pfUI.spellqueue) pfUI.spellqueue.icon:SetAllPoints(pfUI.spellqueue)
pfUI.spellqueue.icon:SetTexCoord(.08, .92, .08, .92) pfUI.spellqueue.icon:SetTexCoord(.08, .92, .08, .92)
+45
View File
@@ -128,6 +128,51 @@ pfUI:RegisterModule("panel", function()
GameTooltip:AddLine(" ") GameTooltip:AddLine(" ")
GameTooltip:AddDoubleLine(T["Memory Usage"], "|cffffffff" .. memmb) GameTooltip:AddDoubleLine(T["Memory Usage"], "|cffffffff" .. memmb)
GameTooltip:AddDoubleLine(T["Next Memory Cleanup"], "|cffffffff" .. gcmb) GameTooltip:AddDoubleLine(T["Next Memory Cleanup"], "|cffffffff" .. gcmb)
-- AddOn memory usage (see MainMenuBarPerformanceBarFrame_OnEnter in MainMenuBar.lua)
local ADDON_MEM_KB_ABBR = _G.ADDON_MEM_KB_ABBR or "(%.0f KB) %s";
local ADDON_MEM_MB_ABBR = _G.ADDON_MEM_MB_ABBR or "(%.2f MB) %s";
local TOTAL_MEM_KB_ABBR = _G.TOTAL_MEM_KB_ABBR or "AddOn Memory: %.0f KB";
local TOTAL_MEM_MB_ABBR = _G.TOTAL_MEM_MB_ABBR or "AddOn Memory: %.2f MB";
UpdateAddOnMemoryUsage()
local totalMem = 0
local topAddOns = {}
for i = 1, GetNumAddOns() do
local mem = GetAddOnMemoryUsage(i)
if mem and mem > 0 then
totalMem = totalMem + mem
for j = 1, 3 do
if not topAddOns[j] or mem > topAddOns[j].value then
for k = 3, j + 1, -1 do
topAddOns[k] = topAddOns[k - 1]
end
topAddOns[j] = { value = mem, name = C_AddOns.GetAddOnName(i) }
break
end
end
end
end
if totalMem > 0 then
local str
if totalMem > 1000 then
str = format(TOTAL_MEM_MB_ABBR, totalMem / 1000)
else
str = format(TOTAL_MEM_KB_ABBR, totalMem)
end
GameTooltip:AddLine(" ")
GameTooltip:AddLine(str, 1, 1, 1)
for i = 1, 3 do
if not topAddOns[i] then break end
if topAddOns[i].value > 1000 then
str = format(ADDON_MEM_MB_ABBR, topAddOns[i].value / 1000, topAddOns[i].name)
else
str = format(ADDON_MEM_KB_ABBR, topAddOns[i].value, topAddOns[i].name)
end
GameTooltip:AddLine(str, 1, 1, 1)
end
end
GameTooltip:AddLine(" ") GameTooltip:AddLine(" ")
GameTooltip:AddDoubleLine(T["Network Down"], "|cffffffff" .. round(nin,1) .. "KB/s") GameTooltip:AddDoubleLine(T["Network Down"], "|cffffffff" .. round(nin,1) .. "KB/s")
GameTooltip:AddDoubleLine(T["Network Up"], "|cffffffff" .. round(nout,1) .. "KB/s") GameTooltip:AddDoubleLine(T["Network Up"], "|cffffffff" .. round(nout,1) .. "KB/s")
+1 -1
View File
@@ -100,7 +100,7 @@ pfUI:RegisterModule("roll", function ()
f.icon:SetWidth(esize) f.icon:SetWidth(esize)
f.icon:SetHeight(esize) f.icon:SetHeight(esize)
f.icon.tex = f.icon:CreateTexture("OVERLAY") f.icon.tex = f.icon:CreateTexture(nil, "OVERLAY")
f.icon.tex:SetTexCoord(.08, .92, .08, .92) f.icon.tex:SetTexCoord(.08, .92, .08, .92)
f.icon.tex:SetAllPoints(f.icon) f.icon.tex:SetAllPoints(f.icon)
+1
View File
@@ -115,6 +115,7 @@ pfUI:RegisterModule("totems", function ()
self.bar[i].cdbg:SetPoint("CENTER", self.bar[i], "CENTER", 0, 0) self.bar[i].cdbg:SetPoint("CENTER", self.bar[i], "CENTER", 0, 0)
self.bar[i].cd = self.bar[i].cd or CreateFrame("Cooldown", "pfTotemsBar"..i.."Cooldown", self.bar[i].cdbg, "CooldownFrameTemplate") self.bar[i].cd = self.bar[i].cd or CreateFrame("Cooldown", "pfTotemsBar"..i.."Cooldown", self.bar[i].cdbg, "CooldownFrameTemplate")
self.bar[i].cd.pfCooldownStyleAnimation = 1 self.bar[i].cd.pfCooldownStyleAnimation = 1
self.bar[i].cd.pfCooldownReverse = tonumber(pfUI_config.totems.cooldown_reverse) or 0
self.bar[i].cd.pfCooldownType = "ALL" self.bar[i].cd.pfCooldownType = "ALL"
self.bar[i]:RegisterForClicks("LeftButtonUp", "RightButtonUp") self.bar[i]:RegisterForClicks("LeftButtonUp", "RightButtonUp")
+1 -1
View File
@@ -30,7 +30,7 @@ pfUI:RegisterModule("tracking", function ()
pfUI.tracking:SetWidth(size) pfUI.tracking:SetWidth(size)
pfUI.tracking:SetHeight(size) pfUI.tracking:SetHeight(size)
pfUI.tracking.icon = pfUI.tracking:CreateTexture("BACKGROUND") pfUI.tracking.icon = pfUI.tracking:CreateTexture(nil, "BACKGROUND")
pfUI.tracking.icon:SetTexCoord(.08, .92, .08, .92) pfUI.tracking.icon:SetTexCoord(.08, .92, .08, .92)
pfUI.tracking.icon:SetAllPoints(pfUI.tracking) pfUI.tracking.icon:SetAllPoints(pfUI.tracking)
+2 -2
View File
@@ -28,12 +28,12 @@ pfUI:RegisterSkin("Petition", function ()
local texture = "StationeryTest" local texture = "StationeryTest"
if date("%m%d") == "0223" then texture = "Stationery_Val" end if date("%m%d") == "0223" then texture = "Stationery_Val" end
local tex_Left = PetitionFrame:CreateTexture("BACKGROUND") local tex_Left = PetitionFrame:CreateTexture(nil, "BACKGROUND")
tex_Left:SetTexture("Interface\\Stationery\\"..texture.."1") tex_Left:SetTexture("Interface\\Stationery\\"..texture.."1")
tex_Left:SetPoint("TOPLEFT", 23, -81) tex_Left:SetPoint("TOPLEFT", 23, -81)
tex_Left:SetWidth(tex_Left:GetWidth() + 10) tex_Left:SetWidth(tex_Left:GetWidth() + 10)
tex_Left:SetHeight(330) tex_Left:SetHeight(330)
local tex_Right = PetitionFrame:CreateTexture("BACKGROUND") local tex_Right = PetitionFrame:CreateTexture(nil, "BACKGROUND")
tex_Right:SetTexture("Interface\\Stationery\\"..texture.."2") tex_Right:SetTexture("Interface\\Stationery\\"..texture.."2")
tex_Right:SetPoint("LEFT", tex_Left, "RIGHT", 0, 0) tex_Right:SetPoint("LEFT", tex_Left, "RIGHT", 0, 0)
tex_Right:SetWidth(tex_Right:GetWidth() + 10) tex_Right:SetWidth(tex_Right:GetWidth() + 10)
+7 -6
View File
@@ -35,13 +35,14 @@ pfUI:RegisterSkin("Pet Stable Master", function ()
StripTextures(button) StripTextures(button)
SkinButton(button, nil, nil, nil, _G[button:GetName().."IconTexture"]) SkinButton(button, nil, nil, nil, _G[button:GetName().."IconTexture"])
button.Enable = function() local b = button
button:SetBackdropColor() b.Enable = function()
button.locked = false b:SetBackdropColor()
b.locked = false
end end
button.Disable = function() b.Disable = function()
button:SetBackdropColor(1, .1, .1, .3) b:SetBackdropColor(1, .1, .1, .3)
button.locked = true b.locked = true
end end
end end