From 948644263ebf1bf4368ceecf2ac7b02c20e864ee Mon Sep 17 00:00:00 2001 From: Casey Raethke Date: Sun, 30 May 2021 14:33:43 -0500 Subject: [PATCH] Be less strict about valid item IDs (#7) --- libs/StatLogic-1.0/StatLogic-1.0.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/StatLogic-1.0/StatLogic-1.0.lua b/libs/StatLogic-1.0/StatLogic-1.0.lua index acd4cd4..e8c5ef9 100644 --- a/libs/StatLogic-1.0/StatLogic-1.0.lua +++ b/libs/StatLogic-1.0/StatLogic-1.0.lua @@ -3885,7 +3885,7 @@ end function StatLogic:RemoveEnchant(link) -- check link - if not strfind(link, "item:%d+:%d+:%d+:%d+:%d+:%d+:%-?%d+:%-?%d+") then + if not strfind(link, "item:%d*:%d*:%d*:%d*:%d*:%d*:%-?%d*:%-?%d*") then return link end local linkType, itemId, enchantId, jewelId1, jewelId2, jewelId3, jewelId4, suffixId, uniqueId = strsplit(":", link) @@ -3894,7 +3894,7 @@ end function StatLogic:RemoveGem(link) -- check link - if not strfind(link, "item:%d+:%d+:%d+:%d+:%d+:%d+:%-?%d+:%-?%d+") then + if not strfind(link, "item:%d*:%d*:%d*:%d*:%d*:%d*:%-?%d*:%-?%d*") then return link end local linkType, itemId, enchantId, jewelId1, jewelId2, jewelId3, jewelId4, suffixId, uniqueId = strsplit(":", link) @@ -3903,7 +3903,7 @@ end function StatLogic:RemoveEnchantGem(link) -- check link - if not strfind(link, "item:%d+:%d+:%d+:%d+:%d+:%d+:%-?%d+:%-?%d+") then + if not strfind(link, "item:%d*:%d*:%d*:%d*:%d*:%d*:%-?%d*:%-?%d*") then return link end local linkType, itemId, enchantId, jewelId1, jewelId2, jewelId3, jewelId4, suffixId, uniqueId = strsplit(":", link)