# HG changeset patch # User Zerotorescue # Date 1295306292 -3600 # Node ID 1729a41324d52e79da9c61a9cfa4de9c2f59219e # Parent 97fd38fb452d907be2c64d7fb4e1142f383111ef Debug channel will now be recreated when it was already found rather than re-used. This should prevent invisible debug frames. diff -r 97fd38fb452d -r 1729a41324d5 Core.lua --- a/Core.lua Sun Jan 16 01:45:25 2011 +0100 +++ b/Core.lua Tue Jan 18 00:18:12 2011 +0100 @@ -4,7 +4,7 @@ local _G = _G; local sformat, ssplit, slower, strim, smatch = _G.string.format, _G.string.split, _G.string.lower, _G.string.trim, _G.string.match; -local mfloor, print, pairs, tonumber = _G.math.floor, _G.print, _G.pairs, _G.tonumber; +local floor, print, pairs, tonumber = _G.floor, _G.print, _G.pairs, _G.tonumber; --@debug@ local addonRevision = 1; @@ -101,11 +101,9 @@ for i = 1, NUM_CHAT_WINDOWS do local name = GetChatWindowInfo(i); - if name:upper() == "DEBUG" then - this.debugChannel = _G["ChatFrame" .. i]; - - addon:Print("A debug channel already exists, used the old one. (" .. i .. ")"); - return; + if string.upper(name) == "DEBUG" then + addon:Print("A debug channel already exists, removing the old one... (" .. i .. ")"); + FCF_Close(_G["ChatFrame" .. i]); end end @@ -370,19 +368,19 @@ function addon:ReadableMoney(copper, clean) local text = ""; - local gold = mfloor( copper / COPPER_PER_GOLD ); + local gold = floor( copper / COPPER_PER_GOLD ); if gold > 0 then text = sformat(goldText, text, gold); end if not clean or (not gold or gold < 10) then - local silver = mfloor( ( copper % COPPER_PER_GOLD ) / COPPER_PER_SILVER ); + local silver = floor( ( copper % COPPER_PER_GOLD ) / COPPER_PER_SILVER ); if silver > 0 then text = sformat(silverText, text, silver); end if not clean or (not gold or gold < 1) then - local copper = mfloor( copper % COPPER_PER_SILVER ); + local copper = floor( copper % COPPER_PER_SILVER ); if copper > 0 or text == "" then text = sformat(copperText, text, copper); end