add handling for miss/parry/immune

This commit is contained in:
pepopo978
2025-04-03 09:32:44 -07:00
parent 78cc28692b
commit a91086a15c
2 changed files with 22 additions and 0 deletions
+16
View File
@@ -32,6 +32,9 @@ local curses = {
-- combat events for curses
local fades_test = L["(.+) fades from (.+)"]
local resist_test = L["Your (.+) was resisted by (.+)"]
local missed_test = L["Your (.+) missed (.+)"]
local parry_test = L["Your (.+) is parried by (.+)"]
local immune_test = L["Your (.+) fails. (.+) is immune"]
local lastGuid = nil
@@ -224,6 +227,19 @@ Cursive:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE",
function(message)
-- check for resist
local _, _, spellName, target = string.find(message, resist_test)
-- check for missed
if not spellName then
_, _, spellName, target = string.find(message, missed_test)
end
-- check for parry
if not spellName then
_, _, spellName, target = string.find(message, parry_test)
end
-- check for immune
if not spellName then
_, _, spellName, target = string.find(message, immune_test)
end
if spellName and target then
spellName = string.lower(spellName)