mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-02 11:40:01 +00:00
Throttles
Added throttle for player castbar, player frame and Raidframes
This commit is contained in:
+11
-1
@@ -11,6 +11,16 @@ pfUI:RegisterModule("player", "vanilla:tbc", function ()
|
||||
pfUI.uf.player:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOM", -75, 125)
|
||||
UpdateMovable(pfUI.uf.player)
|
||||
|
||||
-- Add throttle to player frame OnUpdate
|
||||
if pfUI.uf.player:GetScript("OnUpdate") then
|
||||
local originalOnUpdate = pfUI.uf.player:GetScript("OnUpdate")
|
||||
pfUI.uf.player:SetScript("OnUpdate", function()
|
||||
if (this.tick or 0) > GetTime() then return end
|
||||
this.tick = GetTime() + 0.1
|
||||
originalOnUpdate()
|
||||
end)
|
||||
end
|
||||
|
||||
-- Replace default's RESET_INSTANCES button with an always working one
|
||||
UnitPopupButtons["RESET_INSTANCES_FIX"] = { text = RESET_INSTANCES, dist = 0 }
|
||||
for id, text in pairs(UnitPopupMenus["SELF"]) do
|
||||
@@ -25,4 +35,4 @@ pfUI:RegisterModule("player", "vanilla:tbc", function ()
|
||||
StaticPopup_Show("CONFIRM_RESET_INSTANCES")
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user