From b21da0343004c96743104a722c6762902dea0d47 Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 21 Dec 2017 14:08:58 +0100 Subject: [PATCH] prediction: handle spell delays --- modules/prediction.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/prediction.lua b/modules/prediction.lua index 3a078f52..c8d981a5 100644 --- a/modules/prediction.lua +++ b/modules/prediction.lua @@ -34,6 +34,21 @@ pfUI:RegisterModule("prediction", function () return end + local _, _, evtype, delay = string.find(arg2, '(%a+)/(%d+)/') + if evtype and evtype == "GrpHealdelay" or evtype == "Healdelay" then + local delay = delay/1000 + for target, t in pairs(heals) do + for tsender, amount in pairs(heals[target]) do + if sender == tsender then + amount[2] = amount[2] + delay + pfUI.prediction:TriggerUpdate(target) + pfUI.prediction:AddEvent(amount[2], target) + end + end + end + return + end + local _, _, evtype, target, amount, duration = string.find(arg2, '(Heal)/(%a+)/(%d+)/(%d+)/') if evtype then local timeout = duration/1000 + GetTime()