Skip to content

Commit

Permalink
Be less strict about valid item IDs (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
raethkcj committed May 30, 2021
1 parent e526ee3 commit 9486442
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/StatLogic-1.0/StatLogic-1.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 9486442

Please sign in to comment.