X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/20f8c5a874b5813a9cc639babb497c048e556e66..08251f83f99957e472b328caee22fbfaf5372305:/OmaGtfo/Gtfo.lua diff --git a/OmaGtfo/Gtfo.lua b/OmaGtfo/Gtfo.lua index 539673a..10cd002 100644 --- a/OmaGtfo/Gtfo.lua +++ b/OmaGtfo/Gtfo.lua @@ -38,6 +38,19 @@ local function mobId(guid) return nil; end +local function checkDebuff(id) + local i = 1; + while true do + local _, _, _, _, _, _, _, _, _, spell = UnitAura("player", i, "HARMFUL"); + if not spell then + return false; + elseif spell == id then + return true; + end + i = i + 1; + end +end + -- negatingIgnoreTime-like functionality not implemented local events = { ["SPELL_DAMAGE"] = function(event, source, spellid, spellname, _, arg1, arg2) @@ -50,7 +63,7 @@ local events = { local sound = spell.sound; if spell.eventType and spell.eventType ~= event then return end --if (event == "SPELL_MISSED" or event == "SPELL_PERIODIC_MISSED") and not spell.always then return end - if spell.negatingDebuff and UnitDebuff("player", spell.negatingDebuff) then return end + if spell.negatingDebuff and checkDebuff(spell.negatingDebuff) then return end --if spell.negatingBuff and UnitBuff("player", spell.negatingBuff) then return end --if spell.affirmingDebuff and not UnitDebuff("player", spell.affirmingDebuff) then return end --if spell.mobs and source and not spell.mobs[mobId(source)] then return end @@ -140,7 +153,9 @@ local function updateRole() end local realEvents = { - ["COMBAT_LOG_EVENT_UNFILTERED"] = clog, + ["COMBAT_LOG_EVENT_UNFILTERED"] = function() + return clog(CombatLogGetCurrentEventInfo()); + end, ["GROUP_ROSTER_UPDATE"] = updateGuids, ["PLAYER_ROLES_ASSIGNED"] = updateRole, ["MIRROR_TIMER_START"] = function(timer, _, _, scale)