From 7df4aa6d506b4af6d55e0a10867583d44928a689 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Sat, 25 Jul 2026 00:32:44 -0500 Subject: [PATCH] Hook the real global _G.UnitHealth for feign death Inside a RegisterModule body, `function UnitHealth(...)` defines UnitHealth on the pfUI environment, not the real global -- so the feign-death real-HP fix only reached callers that resolve UnitHealth through pfUI's env, and missed _G consumers (Blizzard frames, other addons). Hook _G.UnitHealth explicitly (and capture oldUnitHealth from _G) so the un-gate applies everywhere. --- modules/feigndeath.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/feigndeath.lua b/modules/feigndeath.lua index 221ca609..053680f3 100644 --- a/modules/feigndeath.lua +++ b/modules/feigndeath.lua @@ -1,6 +1,6 @@ pfUI:RegisterModule("feigndeath", function () - local oldUnitHealth = UnitHealth - function UnitHealth(unit) + local oldUnitHealth = _G.UnitHealth + _G.UnitHealth = function(unit) if UnitIsFeignDeath(unit) then local hp = GetUnitField(unit, "health") if hp and hp > 0 then return hp end