From e1d32025451a9153361ea847c366a3204733ec26 Mon Sep 17 00:00:00 2001 From: shagu Date: Tue, 19 Dec 2017 17:16:50 +0100 Subject: [PATCH] prediction: update on health changes --- modules/prediction.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/prediction.lua b/modules/prediction.lua index ae878047..42af6e8d 100644 --- a/modules/prediction.lua +++ b/modules/prediction.lua @@ -56,9 +56,14 @@ pfUI:RegisterModule("prediction", function () elseif event == "UNIT_COMBAT" and arg2 == "HEAL" then pfUI.prediction:CleanHeals() elseif event == "UNIT_HEALTH" then - if ress[UnitName(arg1)] and not UnitIsDeadOrGhost(arg1) then + local name = UnitName(arg1) + if ress[name] and not UnitIsDeadOrGhost(arg1) then ress[UnitName(arg1)] = nil - pfUI.prediction:TriggerUpdate(UnitName(arg1)) + pfUI.prediction:TriggerUpdate(name) + end + + if heals[name] then + pfUI.prediction:TriggerUpdate(name) end elseif event == "SPELLCAST_STOP" then pfUI.prediction:HealStop(UnitName("player"))