From ce895adb1b7fdeb0f095031fd78dc25fba71c6d5 Mon Sep 17 00:00:00 2001 From: shagu Date: Wed, 6 Nov 2024 13:27:13 +0100 Subject: [PATCH] libdebuff: add function to modify debuff timers --- libs/libdebuff.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/libdebuff.lua b/libs/libdebuff.lua index 8e77c51..1be5953 100644 --- a/libs/libdebuff.lua +++ b/libs/libdebuff.lua @@ -55,6 +55,15 @@ function libdebuff:GetDuration(effect, rank) end end +function libdebuff:UpdateDuration(unit, unitlevel, effect, duration) + if not unit or not effect or not duration then return end + unitlevel = unitlevel or 0 + + if libdebuff.objects[unit] and libdebuff.objects[unit][unitlevel] and libdebuff.objects[unit][unitlevel][effect] then + libdebuff.objects[unit][unitlevel][effect].duration = duration + end +end + function libdebuff:GetMaxRank(effect) local max = 0 for id in pairs(L["debuffs"][effect]) do