PHP код:
local Core = CreateFrame("Frame");
Core:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
Core:SetScript("OnEvent", function(self, event, ...) return self[event](self, ...) end);
local select = select;
local UnitGUID, GetSpellInfo = UnitGUID, GetSpellInfo;
local Mortal = GetSpellInfo(47486);
function Core:IsParry(GUID, missType, spellName)
if missType ~= "PARRY" then return false; end;
if GUID ~= UnitGUID("player") then return false; end;
if spellName ~= Mortal then return false; end;
return true;
end;
function Core:COMBAT_LOG_EVENT_UNFILTERED(...)
local _, eventType, sourceGUID, _, _, _, _, _, _, spellName = select(1, ...);
if eventType == "SPELL_MISSED" then
local missType = select(12, ...);
if self:IsParry(sourceGUID, missType, spellName) then
SendChatMessage(spellName.." Parry", "PARTY");
end;
end;
end;