add refreshtime option

This commit is contained in:
pepopo978
2024-06-12 21:23:20 -07:00
parent 083909bf8e
commit 7bcc6cd44e
3 changed files with 26 additions and 9 deletions
+9 -3
View File
@@ -172,12 +172,18 @@ function curses:ShouldPlayResistSound(guid)
return false
end
function curses:HasCurse(spellName, targetGuid)
function curses:HasCurse(spellName, targetGuid, minRemaining)
if not minRemaining then
minRemaining = 0 -- default to 0
end
if curses.guids[targetGuid] and curses.guids[targetGuid][spellName] then
local remaining = Cursive.curses:TimeRemaining(curses.guids[targetGuid][spellName])
return remaining > 0
if remaining > minRemaining then
return true
end
end
return false
return nil
end
function curses:ApplyCurse(spellID, targetGuid, startTime)