add handling for miss/parry/immune
This commit is contained in:
@@ -34,6 +34,9 @@ L:RegisterTranslations("enUS", function()
|
||||
-- curses
|
||||
["(.+) fades from (.+)"] = true,
|
||||
["Your (.+) was resisted by (.+)"] = true,
|
||||
["Your (.+) missed (.+)"] = true,
|
||||
["Your (.+) is parried by (.+)"] = true,
|
||||
["Your (.+) fails. (.+) is immune"] = true,
|
||||
|
||||
-- global
|
||||
["|cffffcc00Cursive:|cffffaaaa Couldn't detect SuperWoW."] = true,
|
||||
@@ -219,6 +222,9 @@ L:RegisterTranslations("zhCN", function()
|
||||
-- curses
|
||||
["(.+) fades from (.+)"] = "(.+)效果从(.+)身上消失",
|
||||
["Your (.+) was resisted by (.+)"] = "你的(.+)被(.+)抵抗了",
|
||||
["Your (.+) missed (.+)"] = "你的(.+)未命中(.+)",
|
||||
["Your (.+) is parried by (.+)"] = "你的(.+)被(.+)招架",
|
||||
["Your (.+) fails. (.+) is immune"] = "你的(.+)失败,(.+)免疫",
|
||||
|
||||
-- global
|
||||
["|cffffcc00Cursive:|cffffaaaa Couldn't detect SuperWoW."] = "|cffffcc00Cursive:|cffffaaaa 无法检测到SuperWoW.",
|
||||
|
||||
+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