diff --git a/!DebugTools/Blizzard_DebugTools.lua b/!DebugTools/Blizzard_DebugTools.lua index a193c29..4d20baf 100644 --- a/!DebugTools/Blizzard_DebugTools.lua +++ b/!DebugTools/Blizzard_DebugTools.lua @@ -1,4 +1,4 @@ -local mod = math.mod +local modulo = math.modulo local getn = table.getn EVENT_TRACE_EVENT_HEIGHT = 16; @@ -49,7 +49,7 @@ function EventTraceFrame_OnLoad(self) EventTraceFrame_OnSizeChanged(self, self:GetWidth(), self:GetHeight()); self:EnableMouse(true); self:EnableMouseWheel(true); - self:SetScript("OnMouseWheel", function() EventTraceFrame_OnMouseWheel(tris, arg1) end); + self:SetScript("OnMouseWheel", function() EventTraceFrame_OnMouseWheel(this, arg1) end); end local _workTable = {}; @@ -100,14 +100,14 @@ function EventTraceFrame_OnEvent (self, event, ...) local hours = math.floor(minutes / 60); seconds = seconds - 60 * minutes; minutes = minutes - 60 * hours; - hours = mod(hours, 1000) + hours = modulo(hours, 1000) self.times[nextIndex] = string.format("%.2d:%.2d:%06.3f", hours, minutes, seconds); self.timeSinceLast[nextIndex] = 0; self.framesSinceLast[nextIndex] = 0; self.eventids[nextIndex] = GetCurrentEventID(); - local numArgs = select("#", unpack(arg)); - for i=1, numArgs do + local numArgs = getn(arg); + for i = 1, numArgs do if (not self.args[i]) then self.args[i] = {}; end diff --git a/!DebugTools/Blizzard_DebugTools.xml b/!DebugTools/Blizzard_DebugTools.xml index 2a29101..54b6907 100644 --- a/!DebugTools/Blizzard_DebugTools.xml +++ b/!DebugTools/Blizzard_DebugTools.xml @@ -543,7 +543,7 @@ FrameStackTooltip_OnUpdate(this, arg1); - FrameStackTooltip_OnEvent(this, arg); + FrameStackTooltip_OnEvent(this, event, arg1); diff --git a/!DebugTools/Compatibility.lua b/!DebugTools/Compatibility.lua index 0b3f4ec..ffa4af4 100644 --- a/!DebugTools/Compatibility.lua +++ b/!DebugTools/Compatibility.lua @@ -1,7 +1,7 @@ -- Cache global variables -local mod = math.mod local pairs = pairs local tostring = tostring +local fmod = math.fmod local format, match = string.format, string.match local getn, setn, tinsert, tsort, twipe = table.getn, table.setn, table.insert, table.sort, table.wipe -- WoW API @@ -174,7 +174,7 @@ function UpdateFrameStack(tooltip, showHidden) end if l ~= ol then - cs = mod(cs, cn) + 1 + cs = fmod(cs, cn) + 1 ol = l end