Apparently they don't fire COMBAT_LOG_EVENT_UNFILTERED for drinking anymore. Crap.
I'll try coming up with another solution.
---------- Post added 2011-04-13 at 08:42 AM ----------
Code:
local fishtrack = CreateFrame("Frame")
fishtrack:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
fishtrack:RegisterEvent("UNIT_AURA")
fishtrack.num = {}
fishtrack.lastExpire = {}
fishtrack:SetScript("OnEvent", function(self, event, ...)
if event == "COMBAT_LOG_EVENT_UNFILTERED" then
local arg = {...}
if arg[9] == 87644 and arg[2] == "SPELL_CAST_START" then
table.wipe(self.num)
print("Seafood Magnifique Feast detected, emptying count table.")
end
else
local uid=...
local n=UnitName(...)
if self.lastExpire[name] and self.lastExpire[name] > GetTime() then
local _, _, _, _, _, _, exp = UnitAura(uid, "Drink")
if exp then
if exp > self.lastExpire[name] then
self.num[name] = (self.num[name] or 0)+1
if self.num[name] >= 3 then
print(name.." has refreshed his Drink buff "..(self.num[name]).." times since the last feast!")
end
end
self.lastExpire[name] = exp
end
end
end
end)
New stuff. Replace the old file.