Вот так работает, надеюсь все верно
Код:
function VaNRLTRaidChecks:SpellCastHandler(unit,name,target,type,spellid)
if name == skills.fish then
if ac.db.global.RaidChecks.Fish and type == "SPELL_CREATE" then
local link = GetSpellLink(spellid)
if (link==nil) then link = name end
ac:SendRaidMessageWithNick(" -> "..link, unit)
end
if ac.db.global.RaidChecks.FishClick and type == "SPELL_CAST_SUCCESS" then
if not fishclicks[unit] then fishclicks[unit] = 0 end
fishclicks[unit] = fishclicks[unit] + 1
if fishclicks[unit] >= 5 then
ac:SendRaidMessageWithNick("закликивает рыбу!", unit)
end
ac:DelayFunc("fishclick"..unit, 10, function() fishclicks[unit] = 0 end)
end
elseif ac.db.global.RaidChecks.Portal and name == skills.portal and type == "SPELL_CAST_SUCCESS" then
local link = GetSpellLink(spellid)
if (link==nil) then link = name end
ac:SendRaidMessageWithNick(" -> "..link, unit)
elseif ac.db.global.RaidChecks.Dalaran and name == skills.dalaran and type == "SPELL_CAST_START" then
local link = GetSpellLink(spellid)
if (link==nil) then link = name end
ac:SendRaidMessageWithNick(" -> "..link, unit)
elseif ac.db.global.RaidChecks.Kamenor and name == skills.kamenor and type == "SPELL_CAST_START" then
local link = GetSpellLink(spellid)
if (link==nil) then link = name end
ac:SendRaidMessageWithNick(" -> "..link, unit)
end
end