From bc41bc93069b4f00b06859519f613487d8bc9736 Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 16 Nov 2020 21:22:30 +0100 Subject: [PATCH] libcast: allow to hook and inject custom durations --- libs/libcast.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/libcast.lua b/libs/libcast.lua index 3a59c48b..25eb5b5e 100644 --- a/libs/libcast.lua +++ b/libs/libcast.lua @@ -293,9 +293,9 @@ local aimedshot = L["customcast"]["AIMEDSHOT"] local multishot = L["customcast"]["MULTISHOT"] libcast.customcast = {} -libcast.customcast[strlower(aimedshot)] = function(begin) +libcast.customcast[strlower(aimedshot)] = function(begin, duration) if begin then - local duration = 3000 + local duration = duration or 3000 for i=1,32 do if UnitBuff("player", i) == "Interface\\Icons\\Racial_Troll_Berserk" then @@ -334,9 +334,9 @@ libcast.customcast[strlower(aimedshot)] = function(begin) end end -libcast.customcast[strlower(multishot)] = function(begin) +libcast.customcast[strlower(multishot)] = function(begin, duration) if begin then - local duration = 500 + local duration = duration or 500 local _,_, lag = GetNetStats() local start = GetTime() + lag/1000