Mercurial > wow > ouroloot
diff core.lua @ 41:d6b8858c1b64
Fix 'alsolog' toggling during raids when log table already restored. Correct log message when triggering start of an cache animation group. Disable ML/DKP module for now.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Thu, 12 Jan 2012 02:24:15 +0000 |
parents | dc3a66688e50 |
children | 4f1e71f62776 |
line wrap: on
line diff
--- a/core.lua Fri Dec 30 21:29:44 2011 +0000 +++ b/core.lua Thu Jan 12 02:24:15 2012 +0000 @@ -175,8 +175,7 @@ local pprint, tabledump = addon.pprint, flib.tabledump local GetNumRaidMembers = GetNumRaidMembers -- En masse forward decls of symbols defined inside local blocks -local _register_bossmod -local makedate, create_new_cache, _init +local _register_bossmod, makedate, create_new_cache, _init, _log -- Try to extract numbers from the .toc "Version" and munge them into an -- integral form for comparison. The result doesn't need to be meaningful as @@ -327,7 +326,7 @@ cache.hash[x] = datum tinsert (cache.fifo, datum) if not cleanup_group:IsPlaying() then - addon.dprint('cache', cache.name, "with entry", datum.t, "<", datum.x, "> STARTING animation group") + addon.dprint('cache', cache.name, "with entry", datum.t, "<", datum.m, "> STARTING animation group") cache.cleanup:SetDuration(1) -- hmmm cleanup_group:Play() end @@ -361,6 +360,8 @@ ------ Ace3 framework stuff function addon:OnInitialize() + _log = OuroLootSV_log + -- VARIABLES_LOADED has fired by this point; test if we're doing something like -- relogging during a raid and already have collected loot data g_restore_p = OuroLootSV ~= nil @@ -660,7 +661,8 @@ local inside,whatkind = IsInInstance() if inside and (whatkind == "pvp" or whatkind == "arena") then - return self.dprint('flow', "got RRU event but in pvp zone, bailing") + self.dprint('flow', "got RRU event but in pvp zone, bailing") + return end local docheck = self.enabled @@ -1032,10 +1034,15 @@ ------ Behind the scenes routines -- Semi-experimental debugging aid. do + -- Putting _log local to here can result in this sequence: + -- 1) logging happens, followed by reload or logout/login + -- 2) _log points to SV_log + -- 3) VARIABLES_LOADED replaces SV_log pointer with restored version + -- 4) logging happens to _log table (now with no other references) + -- 5) at logout, nothing new has been entered in the table being saved local date = _G.date - local log = OuroLootSV_log function addon:log_with_timestamp (msg) - tinsert (log, date('%m:%d %H:%M:%S ')..msg) + tinsert (_log, date('%m:%d %H:%M:%S ')..msg) end end @@ -1434,7 +1441,7 @@ if type(fmt_opt) == 'table' then -- Two entries, default format time_entry_opt, day_entry = day_entry, fmt_opt fmt_opt = "$Y/$M/$D $h:$m" - --elseif type(fmt_opt) == "string" then -- Day entry only, specified format + --elseif type(fmt_opt) == "string" then -- Day entry only, caller-specified format end end --format_timestamp_values.Y = point2dee:format (day_entry.startday.year % 100)