-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
44 fix missing auction in undercut json (#45)
* #44: fix missing auctions in undercut, add better logging and bump toc version * #44: add missing file to gitignore, remove wrong file from git
- Loading branch information
Showing
6 changed files
with
100 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.DS_Store | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
local SB = select(2, ...) | ||
|
||
local Debug = {} | ||
SB.Debug = Debug | ||
|
||
local private = {} | ||
|
||
|
||
-- wow api | ||
local GetChatWindowInfo = | ||
GetChatWindowInfo | ||
|
||
-- lua api | ||
local type, tostring, string, pairs = | ||
type, tostring, string, pairs | ||
|
||
|
||
function Debug.Log(msg, ...) | ||
local chatFrame = private.GetDebugChatFrame() | ||
if chatFrame then | ||
SB:Printf(chatFrame, msg, ...) | ||
end | ||
end | ||
|
||
function Debug.TableToString ( t ) | ||
local print_r_cache={} | ||
local function sub_print_r(t,indent) | ||
if (print_r_cache[tostring(t)]) then | ||
SB.Debug.Log(indent.."*"..tostring(t)) | ||
else | ||
print_r_cache[tostring(t)]=true | ||
if (type(t)=="table") then | ||
for pos,val in pairs(t) do | ||
if (type(val)=="table") then | ||
SB.Debug.Log(indent.."["..pos.."] => "..tostring(t).." {") | ||
sub_print_r(val,indent..string.rep(" ",string.len(pos)+8)) | ||
SB.Debug.Log(indent..string.rep(" ",string.len(pos)+6).."}") | ||
elseif (type(val)=="string") then | ||
SB.Debug.Log(indent.."["..pos..'] => "'..val..'"') | ||
else | ||
SB.Debug.Log(indent.."["..pos.."] => "..tostring(val)) | ||
end | ||
end | ||
else | ||
SB.Debug.Log(indent..tostring(t)) | ||
end | ||
end | ||
end | ||
if (type(t)=="table") then | ||
SB.Debug.Log(tostring(t).." {") | ||
sub_print_r(t," ") | ||
SB.Debug.Log("}") | ||
else | ||
sub_print_r(t," ") | ||
end | ||
SB.Debug.Log("") | ||
end | ||
|
||
|
||
function private.GetDebugChatFrame() -- private | ||
local tab = -1 | ||
for i = 1, 10 do | ||
if GetChatWindowInfo(i)=="SBDebug" then | ||
tab = i | ||
break | ||
end | ||
end | ||
|
||
if(tab ~= -1) then | ||
return _G["ChatFrame"..tab] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ | ||
..\FrameXML\UI.xsd"> | ||
<Script file="AceConsole-3.0.lua"/> | ||
</Ui> | ||
</Ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters