From d17610fcef64270a99d14261a10d5b92af5d2f86 Mon Sep 17 00:00:00 2001 From: urnati Date: Sun, 4 Feb 2024 21:45:19 -0500 Subject: [PATCH] - Repair : Cleanup debug statement; remove commented out code --- TitanRepair/TitanRepair.lua | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/TitanRepair/TitanRepair.lua b/TitanRepair/TitanRepair.lua index 851d5b4..f2ba0e1 100644 --- a/TitanRepair/TitanRepair.lua +++ b/TitanRepair/TitanRepair.lua @@ -687,33 +687,36 @@ Realized the Disable also changes the button so the DeSat is redundent if TR.guild_bank and TitanGetVar(TITAN_REPAIR_ID,"UseGuildBank") then local withdrawLimit = GetGuildBankWithdrawMoney(); local guildBankMoney = GetGuildBankMoney(); - debug_msg("UseGuildBank" - .." $"..tostring(cost).."" - .." limit: "..tostring(withdrawLimit) - .." guild $: "..tostring(guildBankMoney) - ) + + if TR.show_debug then + debug_msg("UseGuildBank" + .." $"..tostring(cost).."" + .." limit: "..tostring(withdrawLimit) + .." guild $: "..tostring(guildBankMoney) + ) + end ---[[ --]] if IsInGuild() and CanGuildBankRepair() then if withdrawLimit >= cost then RepairAllItems(true) if TitanGetVar(TITAN_REPAIR_ID,"AutoRepairReport") then + -- report repair cost to chat (optional) DEFAULT_CHAT_FRAME:AddMessage(_G["GREEN_FONT_COLOR_CODE"]..L["TITAN_REPAIR"]..": ".."|r" ..L["TITAN_REPAIR_REPORT_COST_CHAT"]..GetTextGSC(cost).."|r" .." "..FROM.." "..GUILD..".") end -- disable repair all icon in merchant --- SetDesaturation(MerchantRepairAllButton, 1); MerchantRepairAllButton:Disable(); -- disable guild bank repair all icon in merchant --- SetDesaturation(MerchantGuildBankRepairButton, 1); MerchantGuildBankRepairButton:Disable(); - -- report repair cost to chat (optional) else - DEFAULT_CHAT_FRAME:AddMessage(_G["GREEN_FONT_COLOR_CODE"]..L["TITAN_REPAIR"]..": ".."|r"..L["TITAN_REPAIR_GBANK_NOMONEY"]) + DEFAULT_CHAT_FRAME:AddMessage(_G["GREEN_FONT_COLOR_CODE"]..L["TITAN_REPAIR"]..": ".."|r" + ..L["TITAN_REPAIR_GBANK_NOMONEY"]) end else - DEFAULT_CHAT_FRAME:AddMessage(_G["GREEN_FONT_COLOR_CODE"]..L["TITAN_REPAIR"]..": ".."|r"..L["TITAN_REPAIR_GBANK_NORIGHTS"]) + DEFAULT_CHAT_FRAME:AddMessage(_G["GREEN_FONT_COLOR_CODE"]..L["TITAN_REPAIR"]..": ".."|r" + ..L["TITAN_REPAIR_GBANK_NORIGHTS"]) end else -- Use own funds if TR.show_debug then @@ -731,10 +734,8 @@ Realized the Disable also changes the button so the DeSat is redundent .." "..FROM.." "..YOU..".") end -- disable repair all icon in merchant --- SetDesaturation(MerchantRepairAllButton, 1); MerchantRepairAllButton:Disable(); -- disable guild bank repair all icon in merchant --- SetDesaturation(MerchantGuildBankRepairButton, 1); MerchantGuildBankRepairButton:Disable(); else DEFAULT_CHAT_FRAME:AddMessage(_G["GREEN_FONT_COLOR_CODE"]..L["TITAN_REPAIR"]..": ".."|r"..L["TITAN_REPAIR_CANNOT_AFFORD"]) -- 1.7.9.5