mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 03:06:01 +00:00
api: use correct combat events for autohide
This commit is contained in:
+4
-4
@@ -1151,13 +1151,13 @@ function pfUI.api.EnableAutohide(frame, timeout, combat)
|
||||
frame.hover:Show()
|
||||
|
||||
if combat then
|
||||
frame.hover:RegisterEvent("PLAYER_ENTER_COMBAT")
|
||||
frame.hover:RegisterEvent("PLAYER_LEAVE_COMBAT")
|
||||
frame.hover:RegisterEvent("PLAYER_REGEN_ENABLED")
|
||||
frame.hover:RegisterEvent("PLAYER_REGEN_DISABLED")
|
||||
frame.hover:SetScript("OnEvent", function()
|
||||
if event == "PLAYER_ENTER_COMBAT" then
|
||||
if event == "PLAYER_REGEN_DISABLED" then
|
||||
this.parent:SetAlpha(1)
|
||||
this.activeTo = "keep"
|
||||
elseif event == "PLAYER_LEAVE_COMBAT" then
|
||||
elseif event == "PLAYER_REGEN_ENABLED" then
|
||||
this.activeTo = GetTime() + timeout
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user