fixes for rip/rake

This commit is contained in:
pepopo978
2025-09-30 10:42:34 -07:00
parent 5196f8dfdb
commit 38eae64df5
2 changed files with 35 additions and 3 deletions
+28 -3
View File
@@ -280,12 +280,21 @@ Cursive:RegisterEvent("UNIT_CASTEVENT", function(casterGuid, targetGuid, event,
end
end
-- delay to check for resists/failures
local delay = 0.2
local _, _, nping = GetNetStats()
-- ignore extreme pings
if nping and nping > 0 and nping < 500 then
delay = 0.05 + (nping / 1000.0) -- convert to seconds
end
if curses.trackedCurseIds[spellID] then
lastGuid = targetGuid
local duration = curses:GetCurseDuration(spellID) - 0.2
Cursive:ScheduleEvent("addCurse" .. targetGuid .. curses.trackedCurseIds[spellID].name, curses.ApplyCurse, 0.2, self, spellID, targetGuid, GetTime(), duration)
local duration = curses:GetCurseDuration(spellID) - delay
Cursive:ScheduleEvent("addCurse" .. targetGuid .. curses.trackedCurseIds[spellID].name, curses.ApplyCurse, delay, self, spellID, targetGuid, GetTime(), duration)
elseif curses.conflagrateSpellIds[spellID] then
Cursive:ScheduleEvent("updateCurse" .. targetGuid .. L["conflagrate"], curses.UpdateCurse, 0.2, self, spellID, targetGuid, GetTime())
Cursive:ScheduleEvent("updateCurse" .. targetGuid .. L["conflagrate"], curses.UpdateCurse, delay, self, spellID, targetGuid, GetTime())
end
elseif event == "START" then
if curses.trackedCurseIds[spellID] then
@@ -590,6 +599,22 @@ function curses:ApplyCurse(spellID, targetGuid, startTime, duration)
local name = curses.trackedCurseIds[spellID].name
local rank = curses.trackedCurseIds[spellID].rank
if curses.isDruid and name == L["rake"] then
-- check that target has rake debuff
-- some mobs are immune and don't trigger the "spell failed xxx is immune" log
for i = 1, 32 do
local _, _, _, debuffSpellId = UnitDebuff(targetGuid, i)
if debuffSpellId then
if debuffSpellId == spellID then
break
end
else
-- no rake found, don't add curse
return
end
end
end
if not curses.guids[targetGuid] then
curses.guids[targetGuid] = {}
end
+7
View File
@@ -1,4 +1,11 @@
function getRipDuration()
-- check if using black morass idol
local _, _, id = strfind(GetInventoryItemLink("player", 18) or "", "item:(%d+)")
if id == "61699" then
-- 10% less duration
return (8 + Cursive.curses.GetComboPointsUsed() * 2) * 0.9
end
return 8 + Cursive.curses.GetComboPointsUsed() * 2
end