-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdebug.lua
More file actions
36 lines (28 loc) · 705 Bytes
/
debug.lua
File metadata and controls
36 lines (28 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
local Recount = _G.Recount
local revision = tonumber(string.sub("$Revision: 1286 $", 12, -3))
if Recount.Version < revision then
Recount.Version = revision
end
local _G = _G
local GetChatWindowInfo = GetChatWindowInfo
local GetTime = GetTime
local NUM_CHAT_WINDOWS = NUM_CHAT_WINDOWS
Recount.Debug = false
function Recount:GetDebugFrame()
for i = 1, NUM_CHAT_WINDOWS do
local windowName = GetChatWindowInfo(i)
if windowName == "Debug" then
return _G["ChatFrame"..i]
end
end
end
function Recount:DPrint(str)
if not Recount.Debug then
return
end
local debugframe = Recount:GetDebugFrame()
if debugframe then
debugframe:AddMessage(str)
--Recount:Print(debugframe, str)
end
end