better handling of rake bleed immunity

This commit is contained in:
pepopo978
2026-03-22 15:16:54 -07:00
parent 24705489a6
commit 1234425231
2 changed files with 37 additions and 6 deletions
+4
View File
@@ -190,6 +190,10 @@ prevent pulling things you didn't intend like marked patrols.
For Warlocks with the Malediction talent, when checking if Curse of Recklessness, Curse of the Elements, or Curse of Shadow is already on a target, the addon will instead check for Curse of Agony to allow you to refresh agony using them. This is enabled by default and can be disabled per-command with `malediction=0`. Don't use the `refreshtime` option with this as the server won't refresh Curse of Agony if it is still on the mob.
Special spells such as `Rake` that deal direct damage but also apply a bleed DoT are handled differently from normal debuffs. When one lands, Cursive starts a 1 second timer then checks that the bleed aura actually appeared on the target. If it did not, Cursive removes the curse.
If that verification failure happened while the target was not at the client buff/debuff cap, the addon assumes that mob name is bleed-immune and caches it in memory. Future casts against mobs with that same name will skip bleed tracking so you do not keep getting `Rake` timers for 1 second on bleed-immune targets.
Mobs with raid marks will be displayed first.
Mobs will the top 3 max hps will always display next. I may make this configurable in the future.
+33 -6
View File
@@ -73,6 +73,8 @@ local curses = {
["0xF130003E75015AB4"] = true, --Sapphiron
["0xF130003E76015AED"] = true, --Kel'Thuzad
},
bleedImmuneMobs = { -- populated with mob names that fail VerifyMeleeBleedApplied to allow skipping future bleed checks
}
}
-- combat events for curses
@@ -301,13 +303,27 @@ local function VerifyMeleeBleedApplied(targetGuid, spellID)
return
end
if not UnitExists(targetGuid) then
return
end
local hasFullBuffsAndDebuffs = true
local auras = GetUnitField(targetGuid, "aura") or {}
for i, auraSpellID in pairs(auras) do
if auraSpellID == spellID then
return
elseif auraSpellID <= 0 then
hasFullBuffsAndDebuffs = false
end
end
if not hasFullBuffsAndDebuffs then
local mobName = UnitName(targetGuid)
if mobName then
curses.bleedImmuneMobs[mobName] = true
end
end
curses:RemoveCurse(targetGuid, curseData.name)
end
@@ -355,10 +371,20 @@ Cursive:RegisterEvent("SPELL_GO_SELF", function(itemId, spellID, casterGuid, tar
if numTargetsHit > 0 then
if curses.trackedCurseIds[spellID] and not curses.travelTimeSpellIds[spellID] then
lastGuid = targetGuid
local duration = curses:GetCurseDuration(spellID)
curses:ApplyCurse(spellID, targetGuid, GetTime(), duration)
if curses.trackedCurseIds[spellID].meleeBleed and not curses.mobsThatBleed[targetGuid] then
Cursive:ScheduleEvent(VerifyMeleeBleedApplied, 0.05, targetGuid, spellID)
local curseData = curses.trackedCurseIds[spellID]
if curseData.meleeBleed then
local mobName = UnitName(targetGuid)
local isBleedImmuneMob = mobName and mobName ~= "" and curses.bleedImmuneMobs[mobName]
if not isBleedImmuneMob then
local duration = curses:GetCurseDuration(spellID)
curses:ApplyCurse(spellID, targetGuid, GetTime(), duration)
if not curses.mobsThatBleed[targetGuid] then
Cursive:ScheduleEvent(VerifyMeleeBleedApplied, 1, targetGuid, spellID)
end
end
else
local duration = curses:GetCurseDuration(spellID)
curses:ApplyCurse(spellID, targetGuid, GetTime(), duration)
end
elseif curses.conflagrateSpellIds[spellID] then
curses:UpdateCurse(spellID, targetGuid, GetTime())
@@ -626,8 +652,9 @@ function curses:ApplyCurse(spellID, targetGuid, startTime, duration)
-- clear pending cast
curses.pendingCast = {}
local name = curses.trackedCurseIds[spellID].name
local rank = curses.trackedCurseIds[spellID].rank
local curseData = curses.trackedCurseIds[spellID]
local name = curseData.name
local rank = curseData.rank
if not curses.guids[targetGuid] then
curses.guids[targetGuid] = {}