mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-01 08:26:57 +00:00
A frame whose unit is another unit's target (targettarget, targettargettarget, pettarget, focustarget, partyNtarget) has no token that unit events name, so it polled: bars every 0.2s, a full aura and portrait rescan every second, and a GUID compare to notice swaps. Such a frame now registers its unit events by the unit's GUID, which every unit event also fires with, and UNIT_TARGET by the GUID of every link of its chain. A link retargeting re-points the frame at once and queues one full refresh; the ticks are gone. The 0.2s visibility timer stays for them, since nothing reports a unit going out of sight. Nameplates register UNIT_TARGET on their own token, so a mob turning to someone else recolours its combat state immediately instead of after the colour cache and data tick run out. Drop pfScanActive and the namebuf delay: both guarded against the old target-swapping range scan, which no longer exists. focus.lua's instantRefresh was never read.
9 lines
420 B
Lua
9 lines
420 B
Lua
pfUI:RegisterModule("targettargettarget", function ()
|
|
-- do not go further on disabled UFs
|
|
if C.unitframes.disable == "1" then return end
|
|
|
|
pfUI.uf.targettargettarget = pfUI.uf:CreateUnitFrame("TargetTargetTarget", nil, C.unitframes.tttarget)
|
|
pfUI.uf.targettargettarget:UpdateFrameSize()
|
|
pfUI.uf.targettargettarget:SetPoint("BOTTOM", UIParent , "BOTTOM", 0, 200)
|
|
UpdateMovable(pfUI.uf.targettargettarget)
|
|
end) |