comparison Junk.lua @ 191:4aeedce4c995 v93

Added better identification of duplicate items.
author yellowfive
date Fri, 30 Oct 2020 21:14:57 -0700
parents 180cb1458674
children
comparison
equal deleted inserted replaced
190:4232d073a90b 191:4aeedce4c995
49 if diffs == 0 then 49 if diffs == 0 then
50 usedItems[bagId][slotId] = true 50 usedItems[bagId][slotId] = true
51 itemData.bagId = bagId 51 itemData.bagId = bagId
52 itemData.slotId = slotId 52 itemData.slotId = slotId
53 return itemData 53 return itemData
54 elseif diffs < 10000 then 54 elseif diffs < 100000 then
55 if itemData.azerite and #itemData.azerite > 0 then 55 if itemData.azerite and #itemData.azerite > 0 then
56 threshold = 100 56 threshold = 1000
57 else 57 else
58 threshold = 10000 58 threshold = 100000
59 end 59 end
60 if diffs < threshold and diffs < bestMatchDiffs then 60 if diffs < threshold and diffs < bestMatchDiffs then
61 -- closest match we could find 61 -- closest match we could find
62 bestMatchDiffs = diffs 62 bestMatchDiffs = diffs
63 itemData.bagId = bagId 63 itemData.bagId = bagId
452 if diffs == 0 then 452 if diffs == 0 then
453 usedItems[bagId][i] = true 453 usedItems[bagId][i] = true
454 itemData.bagId = bagId 454 itemData.bagId = bagId
455 itemData.slotId = i 455 itemData.slotId = i
456 return itemData 456 return itemData
457 elseif diffs < 10000 then 457 elseif diffs < 100000 then
458 if itemData.azerite and #itemData.azerite > 0 then 458 if itemData.azerite and #itemData.azerite > 0 then
459 threshold = 100 459 threshold = 1000
460 else 460 else
461 threshold = 10000 461 threshold = 100000
462 end 462 end
463 if diffs < threshold and diffs < bestMatchDiffs then 463 if diffs < threshold and diffs < bestMatchDiffs then
464 -- closest match we could find 464 -- closest match we could find
465 bestMatchDiffs = diffs 465 bestMatchDiffs = diffs
466 itemData.bagId = bagId 466 itemData.bagId = bagId