mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-16 09:50:50 +00:00
full control over castbar nameplate throttle
This commit is contained in:
@@ -1292,17 +1292,14 @@ nameplates:RegisterEvent("ZONE_CHANGED_NEW_AREA")
|
|||||||
throttle = pfUI.throttle:Get("nameplates") -- Default: 10 FPS
|
throttle = pfUI.throttle:Get("nameplates") -- Default: 10 FPS
|
||||||
end
|
end
|
||||||
|
|
||||||
-- castbar has its own throttle (independent of target throttle)
|
-- When a castbar is actively shown, use the castbar throttle if it's faster
|
||||||
local castbarThrottle = pfUI.throttle:Get("nameplates_castbar") -- Default: 20 FPS
|
-- than the general throttle, so the castbar animation stays smooth
|
||||||
local castbarReady = (nameplate.castLastTick or 0) + castbarThrottle <= now
|
local castbarThrottle = pfUI.throttle:Get("nameplates_castbar")
|
||||||
if nameplate.castUpdate and castbarReady then
|
if isCasting and castbarThrottle < throttle then
|
||||||
nameplate.castLastTick = now
|
throttle = castbarThrottle
|
||||||
elseif nameplate.castUpdate and not castbarReady then
|
|
||||||
nameplate.castUpdate = nil -- defer castUpdate until castbar throttle allows it
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Check for pending event updates (these bypass throttle for immediate response)
|
-- 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
|
local hasEventUpdate = nameplate.eventcache or nameplate.auraUpdate or nameplate.castUpdate or nameplate.targetUpdate or nameplate.comboUpdate
|
||||||
|
|
||||||
-- Event updates bypass throttle
|
-- Event updates bypass throttle
|
||||||
|
|||||||
Reference in New Issue
Block a user