Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local inter = CreateFrame("Frame", "Interruptor", UIParent)
- function inter:UNIT_SPELLCAST_START(event, unitID, spell, rank, lineID, spellID)
- --print("Spell cast start for "..spell)
- end
- function inter:UNIT_SPELLCAST_INTERRUPTED(unitID, spell, rank, lineID, spellID)
- --print("You have been interrupted")
- end
- function inter:COMBAT_LOG_EVENT_UNFILTERED(event, timeStamp, event1, hideCaster, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, spellId, ...)
- if (event1 == "SPELL_INTERRUPT") then
- print("Interrupter: "..sourceName) -- who interrupted
- print("Interruptee: "..destName) -- who has been interrupted
- SendChatMessage(destName.."'s ..' has been interrupted with "..GetSpellLink(spellId).." by "..sourceName.."!", "GUILD", nil, nil)
- end
- end
- inter:SetScript("OnEvent",
- function(self, event, ...)
- if self[event] then
- return self[event] (self, event, ...)
- end
- end)
- inter:RegisterEvent("UNIT_SPELLCAST_START")
- inter:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED")
- inter:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement