Code:
local fishtrack = CreateFrame("Frame")
fishtrack:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
fishtrack.num = {}
fishtrack:SetScript("OnEvent", function(self, event, ...)
local arg = {...}
if arg[9]==87959 and arg[2] == "SPELL_AURA_REFRESH" then
local name = arg[7]
if UnitExists(name) --[[e.g. is in raid or party--]] then
self.num[name] = (self.num[name] or 0) + 1
if self.num[name] >= 10 then
print(name.." has refreshed his Drink buff "..self.num[name].." times!")
end
end
end
if arg[9] == 87644 and arg[2] == "SPELL_CAST_START" then
table.wipe(self.num)
print("Seafood Magnifique Feast detected, emptying count table.")
end
end)
. Untested. Report back in case of errors.