Mercurial > wow > askmrrobot
diff Import.lua @ 191:4aeedce4c995 v93
Added better identification of duplicate items.
author | yellowfive |
---|---|
date | Fri, 30 Oct 2020 21:14:57 -0700 |
parents | a7f2ba17c39a |
children | 4ccc9ff6e824 |
line wrap: on
line diff
--- a/Import.lua Mon Oct 19 11:20:07 2020 -0700 +++ b/Import.lua Fri Oct 30 21:14:57 2020 -0700 @@ -161,7 +161,9 @@ local token = "" local prop = "i" local tokenComplete = false - for j = 1, string.len(itemString) do + local guid = nil + + for j = 1, string.len(itemString) do local c = string.sub(itemString, j, j) if digits[c] == nil then tokenComplete = true @@ -210,6 +212,12 @@ -- we have moved on to the next token prop = c end + + if prop == "!" then + -- guid is always at the end, if present + guid = strsub(itemString, j + 1) + break + end end local obj = {} @@ -237,6 +245,10 @@ obj.bonusIds = bonusIds end + if guid then + obj.guid = guid + end + --if hasAzerites then -- obj.azerite = azerite --end