mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 13:10:00 +00:00
Added new throttle option for nameplate castbar
This commit is contained in:
+13
-3
@@ -1279,17 +1279,27 @@ nameplates:RegisterEvent("ZONE_CHANGED_NEW_AREA")
|
||||
local isCasting = nameplate.castbar and nameplate.castbar:IsShown()
|
||||
|
||||
local throttle
|
||||
if target or isCasting then
|
||||
if target then
|
||||
throttle = pfUI.throttle:Get("nameplates_target") -- Default: 50 FPS
|
||||
elseif visiblePlateCount > 20 then
|
||||
throttle = pfUI.throttle:Get("nameplates_mass") -- Default: 7 FPS for mass pulls
|
||||
else
|
||||
throttle = pfUI.throttle:Get("nameplates") -- Default: 10 FPS
|
||||
end
|
||||
|
||||
|
||||
-- castbar has its own throttle (independent of target throttle)
|
||||
local castbarThrottle = pfUI.throttle:Get("nameplates_castbar") -- Default: 20 FPS
|
||||
local castbarReady = (nameplate.castLastTick or 0) + castbarThrottle <= now
|
||||
if nameplate.castUpdate and castbarReady then
|
||||
nameplate.castLastTick = now
|
||||
elseif nameplate.castUpdate and not castbarReady then
|
||||
nameplate.castUpdate = nil -- defer castUpdate until castbar throttle allows it
|
||||
end
|
||||
|
||||
-- Check for pending event updates (these bypass throttle for immediate response)
|
||||
-- castUpdate is now handled by its own throttle above, not the general bypass
|
||||
local hasEventUpdate = nameplate.eventcache or nameplate.auraUpdate or nameplate.castUpdate or nameplate.targetUpdate or nameplate.comboUpdate
|
||||
|
||||
|
||||
-- Event updates bypass throttle
|
||||
if not hasEventUpdate and (nameplate.lasttick or 0) + throttle > now then return end
|
||||
nameplate.lasttick = now
|
||||
|
||||
Reference in New Issue
Block a user