mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 05:20:49 +00:00
libcast: allow to hook and inject custom durations
This commit is contained in:
+4
-4
@@ -293,9 +293,9 @@ local aimedshot = L["customcast"]["AIMEDSHOT"]
|
|||||||
local multishot = L["customcast"]["MULTISHOT"]
|
local multishot = L["customcast"]["MULTISHOT"]
|
||||||
|
|
||||||
libcast.customcast = {}
|
libcast.customcast = {}
|
||||||
libcast.customcast[strlower(aimedshot)] = function(begin)
|
libcast.customcast[strlower(aimedshot)] = function(begin, duration)
|
||||||
if begin then
|
if begin then
|
||||||
local duration = 3000
|
local duration = duration or 3000
|
||||||
|
|
||||||
for i=1,32 do
|
for i=1,32 do
|
||||||
if UnitBuff("player", i) == "Interface\\Icons\\Racial_Troll_Berserk" then
|
if UnitBuff("player", i) == "Interface\\Icons\\Racial_Troll_Berserk" then
|
||||||
@@ -334,9 +334,9 @@ libcast.customcast[strlower(aimedshot)] = function(begin)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
libcast.customcast[strlower(multishot)] = function(begin)
|
libcast.customcast[strlower(multishot)] = function(begin, duration)
|
||||||
if begin then
|
if begin then
|
||||||
local duration = 500
|
local duration = duration or 500
|
||||||
local _,_, lag = GetNetStats()
|
local _,_, lag = GetNetStats()
|
||||||
local start = GetTime() + lag/1000
|
local start = GetTime() + lag/1000
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user