Files
pfUI/modules/player.lua
T
Meow f43b8f19f8 update for libdebuff
Read the readme!
Version push
2026-02-06 16:32:13 +01:00

33 lines
1.1 KiB
Lua

pfUI:RegisterModule("player", "vanilla:tbc", function ()
-- do not go further on disabled UFs
if C.unitframes.disable == "1" then return end
PlayerFrame:Hide()
PlayerFrame:UnregisterAllEvents()
pfUI.uf.player = pfUI.uf:CreateUnitFrame("Player", nil, C.unitframes.player)
pfUI.uf.player:UpdateFrameSize()
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
pfUI.uf.player:SetScript("OnUpdate", pfUI.uf.player:GetScript("OnUpdate"))
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
if text == "RESET_INSTANCES" then
UnitPopupMenus["SELF"][id] = "RESET_INSTANCES_FIX"
end
end
hooksecurefunc("UnitPopup_OnClick", function()
local button = this.value
if button == "RESET_INSTANCES_FIX" then
StaticPopup_Show("CONFIRM_RESET_INSTANCES")
end
end)
end)