diff --git a/ElvUI_ProjectZidras/Libraries/oUF_Plugins/HealthPrediction.lua b/ElvUI_ProjectZidras/Libraries/oUF_Plugins/HealthPrediction.lua index 8ec3caf..492ddaf 100644 --- a/ElvUI_ProjectZidras/Libraries/oUF_Plugins/HealthPrediction.lua +++ b/ElvUI_ProjectZidras/Libraries/oUF_Plugins/HealthPrediction.lua @@ -112,9 +112,10 @@ local function Update(self, event, unit, absorb) local unitGUID = UnitGUID(unit) local lookAhead = element.lookAhead or 5 + local timeWindow = lookAhead and (GetTime() + lookAhead) or nil - local myIncomingHeal = (HealComm:GetHealAmount(unitGUID, HealComm.ALL_HEALS, GetTime() + lookAhead, UnitGUID("player")) or 0) * (HealComm:GetHealModifier(unitGUID) or 1) or 0 - local allIncomingHeal = (HealComm:GetHealAmount(unitGUID, HealComm.ALL_HEALS, GetTime() + lookAhead) or 0) * (HealComm:GetHealModifier(unitGUID) or 1) or 0 + local myIncomingHeal = ((HealComm:GetHealAmount(unitGUID, HealComm.ALL_HEALS, timeWindow, UnitGUID("player")) or 0) * (HealComm:GetHealModifier(unitGUID) or 1)) or 0 + local allIncomingHeal = ((HealComm:GetHealAmount(unitGUID, HealComm.ALL_HEALS, timeWindow) or 0) * (HealComm:GetHealModifier(unitGUID) or 1)) or 0 absorb = absorb or SA.UnitTotal(UnitGUID(unit)) or 0 local healAbsorb = SA.UnitTotalHealAbsorbs(UnitGUID(unit)) or 0 local health, maxHealth = UnitHealth(unit), UnitHealthMax(unit) diff --git a/ElvUI_ProjectZidras/Modules/UnitFrames/Elements/HealPrediction.lua b/ElvUI_ProjectZidras/Modules/UnitFrames/Elements/HealPrediction.lua index 34a248b..c028686 100644 --- a/ElvUI_ProjectZidras/Modules/UnitFrames/Elements/HealPrediction.lua +++ b/ElvUI_ProjectZidras/Modules/UnitFrames/Elements/HealPrediction.lua @@ -119,6 +119,10 @@ function ZUF:Configure_HealComm(frame) if db.enable ~= E.db.pz.unitframe.units[frame.unitframeType].absorbPrediction.enable then db.enable = true end -- workaround because RaidGroup1Button1 and PartyGroup1Button1 db.enable were being rewritten to false for some reason end + if frame:IsElementEnabled("HealComm4") then + frame:DisableElement("HealComm4") -- disable stock ElvUI element since it was messing with the heal prediction (lookAhead, tags, statusbar). HealthPrediction is provided by PZ and is meant to be a full replacement. + end + if db and db.enable then local pred = frame.HealCommBar