Quantcast

- TitanRepair : Logic addition for Classic versus Retail versions for color parsing.

HonorGoG [04-27-25 - 09:06]
- TitanRepair : Logic addition for Classic versus Retail versions for color parsing.
Filename
TitanRepair/TitanRepair.lua
diff --git a/TitanRepair/TitanRepair.lua b/TitanRepair/TitanRepair.lua
index c88788e..31ebf5b 100644
--- a/TitanRepair/TitanRepair.lua
+++ b/TitanRepair/TitanRepair.lua
@@ -12,7 +12,7 @@ local TITAN_REPAIR_ID = "Repair";
 local TITAN_BUTTON = "TitanPanel"..TITAN_REPAIR_ID.."Button"

 local L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
-local TitanRepair = {}
+local TitanRepair = {};
 local _G = getfenv(0);
 local TR = TitanRepair
 TR.ITEM_STATUS = {};
@@ -22,6 +22,8 @@ local AceTimer = LibStub("AceTimer-3.0")
 local TR_Timer = {}
 local TR_Timer_active = false

+local parse_item = "";
+
 ---@diagnostic disable-next-line: deprecated
 local GetItem = C_Item.GetItemInfo or GetItemInfo -- For Classic versions
 ---@diagnostic disable-next-line: deprecated
@@ -92,12 +94,12 @@ TR.wowversion  = select(4, GetBuildInfo())
 if TR.wowversion <  20300 then
 	-- No guild bank
 	TR.guild_bank = false
-    local parse_item =
+    parse_item =
         "|?c?f?f?(%x*)|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*):?(%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?"
 else
 	-- Guild bank exists
 	TR.guild_bank = true
-    local parse_item =
+    parse_item =
 	    "|?cnIQ?(%x*):|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*):?(%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?"
 end