diff --git a/curses.lua b/curses.lua index c48a13b..a7a69c7 100644 --- a/curses.lua +++ b/curses.lua @@ -325,9 +325,8 @@ Cursive:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE", end if spellName and failedTarget then - spellName = string.lower(spellName) + spellName = curses:GetLowercaseSpellName(spellName) - -- clear pending cast curses.pendingCast = {} if curses.trackedCurseNamesToTextures[spellName] and lastGuid then @@ -355,7 +354,7 @@ Cursive:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_OTHER", function(message) -- check if spell that faded is relevant local _, _, spellName, target = string.find(message, fades_test) if spellName and target then - spellName = string.lower(spellName) + spellName = curses:GetLowercaseSpellName(spellName) if curses.trackedCurseNamesToTextures[spellName] then -- loop through targets with active curses for guid, data in pairs(curses.guids) do @@ -374,6 +373,17 @@ Cursive:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_OTHER", function(message) end ) +function curses:GetLowercaseSpellName(spellName) + spellName = string.lower(spellName) + + -- handle faerie fire special case + if curses.isDruid and string.find(spellName, L["faerie fire"]) then + return L["faerie fire"] + end + + return spellName +end + function curses:GetLastTickTime(curseData) local ticks = curses.trackedCurseIds[curseData.spellID].numTicks if not ticks then