From 3db0f569b9021ea816cecf46ae2b905a30c662c3 Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 10 Nov 2018 13:34:28 +0100 Subject: [PATCH] libcast: correct channel delay calculation --- libs/libcast.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/libcast.lua b/libs/libcast.lua index 4666ba22..fb941d35 100644 --- a/libs/libcast.lua +++ b/libs/libcast.lua @@ -214,7 +214,9 @@ libcast:SetScript("OnEvent", function() this.db[player].channel = nil end elseif event == "SPELLCAST_CHANNEL_UPDATE" then - this.db[player].start = this.db[player].start - arg1 / 1000 + if this.db[player].cast then + this.db[player].start = -this.db[player].casttime/1000 + GetTime() + arg1/1000 + end -- Fill database with environmental casts elseif arg1 then -- (.+) begins to cast (.+).