i haven't tested this, but i think it would do what you want. i tried to keep it compact and easy to modify like the original was...although the argN stuff really should be updated:
Code:
function DMBMB_OnLoad()
this:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
end
function DMBMB_OnEvent(event)
if arg2 ~= "SPELL_CAST_START" then return end
if bit.band(arg5, bit.bor(COMBATLOG_OBJECT_TYPE_PLAYER, COMBATLOG_OBJECT_REACTION_HOSTILE, COMBATLOG_OBJECT_AFFILIATION_OUTSIDER)) ~= arg5 then return end
if arg6 ~= UnitGUID("player") then return end
local spell = arg10
--------------------------------------------------------------------------------------------------------------------------------------
if spell == "Manabrand" then
ZoneTextString:SetText("Vorsicht Manabrand!");
ZoneTextFrame.startTime = GetTime()
ZoneTextFrame.fadeInTime = 0
ZoneTextFrame.holdTime = 1
ZoneTextFrame.fadeOutTime = 2
ZoneTextString:SetTextColor(0, 1, 0);
PVPInfoTextString:SetText("");
ZoneTextFrame:Show()
PlaySoundFile("Interface\\AddOns\\DMBMB\\Sounds\\manaburn.wav");
end
if spell == "Verwandlung" then
ZoneTextString:SetText("Vorsicht Verwandlung!");
ZoneTextFrame.startTime = GetTime()
ZoneTextFrame.fadeInTime = 0
ZoneTextFrame.holdTime = 1
ZoneTextFrame.fadeOutTime = 2
ZoneTextString:SetTextColor(0, 1, 0);
PVPInfoTextString:SetText("");
ZoneTextFrame:Show()
PlaySoundFile("Interface\\AddOns\\DMBMB\\Sounds\\sheep.wav");
end
if spell == "Furcht" then
ZoneTextString:SetText("Vorsicht Furcht!");
ZoneTextFrame.startTime = GetTime()
ZoneTextFrame.fadeInTime = 0
ZoneTextFrame.holdTime = 1
ZoneTextFrame.fadeOutTime = 2
ZoneTextString:SetTextColor(0, 1, 0);
PVPInfoTextString:SetText("");
ZoneTextFrame:Show()
PlaySoundFile("Interface\\AddOns\\DMBMB\\Sounds\\fear.wav");
end
--------------------------------------------------------------------------------------------------------------------------------------
end