From 1bd358eb13828bb59bad37292b891dd7ab002324 Mon Sep 17 00:00:00 2001 From: shagu Date: Tue, 14 Jun 2022 19:16:01 +0200 Subject: [PATCH] api: use correct combat events for autohide --- api/api.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/api.lua b/api/api.lua index 2fe63a31..61603b2d 100644 --- a/api/api.lua +++ b/api/api.lua @@ -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)