Mercurial > wow > askmrrobot
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 190:4232d073a90b | 191:4aeedce4c995 |
|---|---|
| 159 local hasBonuses = false | 159 local hasBonuses = false |
| 160 --local hasAzerites = false | 160 --local hasAzerites = false |
| 161 local token = "" | 161 local token = "" |
| 162 local prop = "i" | 162 local prop = "i" |
| 163 local tokenComplete = false | 163 local tokenComplete = false |
| 164 for j = 1, string.len(itemString) do | 164 local guid = nil |
| 165 | |
| 166 for j = 1, string.len(itemString) do | |
| 165 local c = string.sub(itemString, j, j) | 167 local c = string.sub(itemString, j, j) |
| 166 if digits[c] == nil then | 168 if digits[c] == nil then |
| 167 tokenComplete = true | 169 tokenComplete = true |
| 168 else | 170 else |
| 169 token = token .. c | 171 token = token .. c |
| 208 tokenComplete = false | 210 tokenComplete = false |
| 209 | 211 |
| 210 -- we have moved on to the next token | 212 -- we have moved on to the next token |
| 211 prop = c | 213 prop = c |
| 212 end | 214 end |
| 215 | |
| 216 if prop == "!" then | |
| 217 -- guid is always at the end, if present | |
| 218 guid = strsub(itemString, j + 1) | |
| 219 break | |
| 220 end | |
| 213 end | 221 end |
| 214 | 222 |
| 215 local obj = {} | 223 local obj = {} |
| 216 | 224 |
| 217 if hasSlot then | 225 if hasSlot then |
| 235 | 243 |
| 236 if hasBonuses then | 244 if hasBonuses then |
| 237 obj.bonusIds = bonusIds | 245 obj.bonusIds = bonusIds |
| 238 end | 246 end |
| 239 | 247 |
| 248 if guid then | |
| 249 obj.guid = guid | |
| 250 end | |
| 251 | |
| 240 --if hasAzerites then | 252 --if hasAzerites then |
| 241 -- obj.azerite = azerite | 253 -- obj.azerite = azerite |
| 242 --end | 254 --end |
| 243 end | 255 end |
| 244 end | 256 end |
