I'm trying to make an addon that tracks your mirror images and water elemental as a mage. The only problem I'm having is the fact that I can't register the actual cast of the mirrors/elemental!
Right now this is my code:
Code:
local CLL = CreateFrame("Frame") -- (CombatLogListener)
CLL:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
CLL:SetScript("OnEvent", function(self, event, ...)
if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
local timestamp, eventType, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = select(1, ...)
local spellId, spellName, spellSchool = select(9, ...)
if (eventType=="SPELL_CAST_SUCCESS") then
if sourceName == UnitName("player") then
if (spellId == 55342) then
mirrorUp = true
mirrorCastTime = GetTime()
print("|cff69CCF0Mirror images summoned!")
end
if (spellId == 31687) then
eleUp = true
eleCastTime = GetTime()
print("|cff69CCF0Water elemental summoned!")
end
end
end
end
end)
I'm not receiving any errors in-game, nor am I receiving any sign that it is working. Can anyone look at my code and see what I'm missing here?
Thanks!