PHP код:
local Offensive, Defensive, Failed = true, true, true;
local SpellLink = true;
local Channel = "PARTY";
local Core = CreateFrame("Frame");
Core:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
Core:SetScript("OnEvent", function(self, event, ...)
if ((select(2, ...) == "SPELL_DISPEL" or select(2, ...) == "SPELL_STOLEN") or (Failed == true and select(2, ...) == "SPELL_DISPEL_FAILED")) and (select(4, ...) == UnitName("player") or select(4, ...) == UnitName("pet")) then
local extraSpellID = select(12, ...);
local PrintSpell, PrintMSG;
if SpellLink == true then
PrintSpell = GetSpellLink(extraSpellID);
else
PrintSpell = select(13, ...);
end;
if (select(2, ...) == "SPELL_DISPEL" or select(2, ...) == "SPELL_STOLEN") then PrintMSG = "Removed "; end;
if Failed == true and select(2, ...) == "SPELL_DISPEL_FAILED" then PrintMSG = "FAILED "; end;
if (Defensive == true and bit.band(select(8, ...), COMBATLOG_OBJECT_REACTION_FRIENDLY) > 0) or (Offensive == true and bit.band(select(8, ...), COMBATLOG_OBJECT_REACTION_FRIENDLY) <= 0) then
SendChatMessage(PrintMSG..PrintSpell.." --> ("..select(7, ...)..")", Channel);
end;
end;
end);