From bb9832c03e3dae00d8d703fa73768dd5dffeedc0 Mon Sep 17 00:00:00 2001 From: pepopo978 Date: Mon, 18 Aug 2025 14:05:29 -0700 Subject: [PATCH] handle ferocious bite refresh --- curses.lua | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/curses.lua b/curses.lua index 09df9be..516b184 100644 --- a/curses.lua +++ b/curses.lua @@ -27,6 +27,9 @@ local curses = { resistSoundGuids = {}, expiringSoundGuids = {}, requestedExpiringSoundGuids = {}, -- guid added on spellcast, moved to expiringSoundGuids once rendered by ui + lastComboPoints = 0, + lastCastSpellId = 0, + lastCastTargetGuid = 0, sharedDebuffs = { faeriefire = {}, @@ -62,7 +65,6 @@ function curses:LoadCurses() curses.isShaman = playerClassName == "SHAMAN" curses.isWarrior = playerClassName == "WARRIOR" - -- curses to track if curses.isWarlock then curses.trackedCurseIds = getWarlockSpells() @@ -109,6 +111,35 @@ function curses:LoadCurses() -- update trackedCurseIds curses.trackedCurseIds[id].texture = texture end + + if curses.isDruid then + Cursive:RegisterEvent("PLAYER_COMBO_POINTS", function() + local currentComboPoints = GetComboPoints() + if currentComboPoints > curses.lastComboPoints then + -- combo points increased, check if last spell was Ferocious Bite + if curses.lastCastSpellId == 22557 or + curses.lastCastSpellId == 22568 or + curses.lastCastSpellId == 22827 or + curses.lastCastSpellId == 22828 or + curses.lastCastSpellId == 22829 or + curses.lastCastSpellId == 31018 then + + -- check if Rip active + local rip = L["rip"] + if curses:HasCurse(rip, curses.lastCastTargetGuid, 0) then + curses.guids[curses.lastCastTargetGuid][rip]["start"] = GetTime() -- reset start time to current time + end + + -- check if Rake active + local rake = L["rake"] + if curses:HasCurse(rake, curses.lastCastTargetGuid, 0) then + curses.guids[curses.lastCastTargetGuid][rake]["start"] = GetTime() -- reset start time to current time + end + end + end + curses.lastComboPoints = currentComboPoints + end) + end end function curses:ScanTooltipForDuration(curseSpellID) @@ -207,6 +238,9 @@ Cursive:RegisterEvent("UNIT_CASTEVENT", function(casterGuid, targetGuid, event, castDuration = castDuration } + curses.lastCastSpellId = spellID + curses.lastCastTargetGuid = targetGuid + if curses.trackedCurseIds[spellID] then lastGuid = targetGuid local duration = curses:GetCurseDuration(spellID) - 0.2