Quantcast

- Repair : Cleanup debug statement; remove commented out code

urnati [02-05-24 - 02:45]
- Repair : Cleanup debug statement; remove commented out code
Filename
TitanRepair/TitanRepair.lua
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"])