add handling for miss/parry/immune
This commit is contained in:
+16
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user