From df355e019c4651a298e52bc39a25884ee167e50d Mon Sep 17 00:00:00 2001 From: namreeb Date: Sun, 21 Apr 2024 08:17:23 -1000 Subject: [PATCH] Added workaround for direct heals not reported by client when HealComm is present (#1198) --- .../Core/oUF/elements/healthprediction.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ElvUI_Libraries/Core/oUF/elements/healthprediction.lua b/ElvUI_Libraries/Core/oUF/elements/healthprediction.lua index 9f853a644b..847655cc49 100644 --- a/ElvUI_Libraries/Core/oUF/elements/healthprediction.lua +++ b/ElvUI_Libraries/Core/oUF/elements/healthprediction.lua @@ -108,6 +108,21 @@ local function Update(self, event, unit) local otherIncomingHeal = 0 local hasOverHealAbsorb = false + -- Kludge to override value for heals not reported by WoW client (ref: https://github.com/Stanzilla/WoWUIBugs/issues/163) + -- There may be other bugs that this workaround does not catch, but this does fix Priest PoH + if(HealComm and not oUF.isRetail) then + local healAmount = HealComm:GetHealAmount(GUID, HealComm.CASTED_HEALS) or 0 + if(healAmount > 0) then + if(myIncomingHeal == 0 and unit == 'player') then + myIncomingHeal = healAmount + end + + if(allIncomingHeal == 0) then + allIncomingHeal = healAmount + end + end + end + if(healAbsorb > allIncomingHeal) then healAbsorb = healAbsorb - allIncomingHeal allIncomingHeal = 0